summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_db.c14
-rw-r--r--source3/registry/reg_perfcount.c2
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 */