diff options
author | Günther Deschner <gd@samba.org> | 2009-09-25 01:00:24 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-09-30 00:34:01 +0200 |
commit | 26e798da19a9c36fad62e978545c6dfc90a9645d (patch) | |
tree | 5bba447c809e1c9f92e601f3301f1489e387aca6 /source3/registry | |
parent | 2ccf75d9a9e73a05ab5cbe56526aba3bb45011f0 (diff) | |
download | samba-26e798da19a9c36fad62e978545c6dfc90a9645d.tar.gz samba-26e798da19a9c36fad62e978545c6dfc90a9645d.tar.bz2 samba-26e798da19a9c36fad62e978545c6dfc90a9645d.zip |
s3: remove unused regval_convert_multi_sz().
Guenther
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_util.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/source3/registry/reg_util.c b/source3/registry/reg_util.c index e468a6244a..fd7652116f 100644 --- a/source3/registry/reg_util.c +++ b/source3/registry/reg_util.c @@ -158,56 +158,3 @@ char *reg_remaining_path(TALLOC_CTX *ctx, const char *key) return p; } - -/********************************************************************** -*********************************************************************/ - -int regval_convert_multi_sz( uint16 *multi_string, size_t byte_len, char ***values ) -{ - char **sz; - int i; - int num_strings = 0; - fstring buffer; - uint16 *wp; - size_t multi_len = byte_len / 2; - - if ( !multi_string || !values ) - return 0; - - *values = NULL; - - /* just count the NULLs */ - - for ( i=0; (i<multi_len-1) && !(multi_string[i]==0x0 && multi_string[i+1]==0x0); i++ ) { - /* peek ahead */ - if ( multi_string[i+1] == 0x0 ) - num_strings++; - } - - if ( num_strings == 0 ) - return 0; - - if ( !(sz = TALLOC_ARRAY( NULL, char*, num_strings+1 )) ) { - DEBUG(0,("reg_convert_multi_sz: talloc() failed!\n")); - return -1; - } - - wp = multi_string; - - for ( i=0; i<num_strings; i++ ) { - rpcstr_pull( buffer, wp, sizeof(buffer), -1, STR_TERMINATE ); - sz[i] = talloc_strdup( sz, buffer ); - - /* skip to the next string NULL and then one more */ - while ( *wp ) - wp++; - wp++; - } - - /* tag the array off with an empty string */ - sz[i] = '\0'; - - *values = sz; - - return num_strings; -} |