diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-03-29 09:35:51 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:00 -0500 |
commit | bc2b6436d0f5f3e9ffdfaeb7f1b32996a83d5478 (patch) | |
tree | 45124e070043ee0fd3774d74b4cfdcf1c8919c27 /source3/registry | |
parent | b9461058d59f8e4f4b69c31592bd12a179b2d8ac (diff) | |
download | samba-bc2b6436d0f5f3e9ffdfaeb7f1b32996a83d5478.tar.gz samba-bc2b6436d0f5f3e9ffdfaeb7f1b32996a83d5478.tar.bz2 samba-bc2b6436d0f5f3e9ffdfaeb7f1b32996a83d5478.zip |
r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users
metze
(This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_db.c | 14 | ||||
-rw-r--r-- | source3/registry/reg_perfcount.c | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index 3050c852df..224dd7e0f6 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -329,7 +329,7 @@ int regdb_close( void ) static BOOL regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr ) { TDB_DATA dbuf; - char *buffer; + uint8 *buffer; int i = 0; uint32 len, buflen; BOOL ret = True; @@ -344,7 +344,7 @@ static BOOL regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr ) /* allocate some initial memory */ - if (!(buffer = (char *)SMB_MALLOC(sizeof(pstring)))) { + if (!(buffer = (uint8 *)SMB_MALLOC(sizeof(pstring)))) { return False; } buflen = sizeof(pstring); @@ -360,7 +360,7 @@ static BOOL regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr ) len += tdb_pack( buffer+len, buflen-len, "f", regsubkey_ctr_specific_key(ctr, i) ); if ( len > buflen ) { /* allocate some extra space */ - if ((buffer = (char *)SMB_REALLOC( buffer, len*2 )) == NULL) { + if ((buffer = (uint8 *)SMB_REALLOC( buffer, len*2 )) == NULL) { DEBUG(0,("regdb_store_keys: Failed to realloc memory of size [%d]\n", len*2)); ret = False; goto done; @@ -507,7 +507,7 @@ int regdb_fetch_keys( const char* key, REGSUBKEY_CTR *ctr ) pstring path; uint32 num_items; TDB_DATA dbuf; - char *buf; + uint8 *buf; uint32 buflen, len; int i; fstring subkeyname; @@ -548,7 +548,7 @@ int regdb_fetch_keys( const char* key, REGSUBKEY_CTR *ctr ) Unpack a list of registry values frem the TDB ***************************************************************************/ -static int regdb_unpack_values(REGVAL_CTR *values, char *buf, int buflen) +static int regdb_unpack_values(REGVAL_CTR *values, uint8 *buf, int buflen) { int len = 0; uint32 type; @@ -593,7 +593,7 @@ static int regdb_unpack_values(REGVAL_CTR *values, char *buf, int buflen) Pack all values in all printer keys ***************************************************************************/ -static int regdb_pack_values(REGVAL_CTR *values, char *buf, int buflen) +static int regdb_pack_values(REGVAL_CTR *values, uint8 *buf, int buflen) { int len = 0; int i; @@ -673,7 +673,7 @@ BOOL regdb_store_values( const char *key, REGVAL_CTR *values ) return False; } - data.dptr = SMB_MALLOC_ARRAY( char, len ); + data.dptr = SMB_MALLOC_ARRAY( uint8, len ); data.dsize = len; len = regdb_pack_values( values, data.dptr, data.dsize ); diff --git a/source3/registry/reg_perfcount.c b/source3/registry/reg_perfcount.c index c90f989515..297e27ecc7 100644 --- a/source3/registry/reg_perfcount.c +++ b/source3/registry/reg_perfcount.c @@ -182,7 +182,7 @@ static uint32 _reg_perfcount_multi_sz_from_tdb(TDB_CONTEXT *tdb, buffer_size = 0; return buffer_size; } - init_unistr2(&name_index, kbuf.dptr, UNI_STR_TERMINATE); + init_unistr2(&name_index, (const char *)kbuf.dptr, UNI_STR_TERMINATE); memcpy(buf1+buffer_size, (char *)name_index.buffer, working_size); buffer_size += working_size; /* Now encode the actual name */ |