s3: remove unused regval_convert_multi_sz().
authorGünther Deschner <gd@samba.org>
Thu, 24 Sep 2009 23:00:24 +0000 (01:00 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 29 Sep 2009 22:34:01 +0000 (00:34 +0200)
Guenther

source3/include/proto.h
source3/registry/reg_util.c

index 5783a5e8403076a0dbe8aab637c1ad24b15222ec..05651e2cd490a826b5d57a910e74b391d47f3b4d 100644 (file)
@@ -5158,7 +5158,6 @@ bool reg_split_key(char *path, char **base, char **key);
 char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname );
 void normalize_dbkey(char *key);
 char *reg_remaining_path(TALLOC_CTX *ctx, const char *key);
-int regval_convert_multi_sz( uint16 *multi_string, size_t byte_len, char ***values );
 
 /* The following definitions come from registry/reg_util_legacy.c  */
 
index e468a6244ae67cfeaf017dda38d2cc638cca3918..fd7652116f91d5b5d3c6ba030ebebb2a9cfe2549 100644 (file)
@@ -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;
-}