summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-09-26 16:26:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:46 -0500
commitbd2f02e6968d19080b8cc4ded129f0b1b78f759d (patch)
tree98c021ca8f8ad98aa7b9b498173044b018dc10cd /source3
parent52d45a51d3994aa99d2b348ce484a8b7a3830ff3 (diff)
downloadsamba-bd2f02e6968d19080b8cc4ded129f0b1b78f759d.tar.gz
samba-bd2f02e6968d19080b8cc4ded129f0b1b78f759d.tar.bz2
samba-bd2f02e6968d19080b8cc4ded129f0b1b78f759d.zip
r18921: Fix some c++ warnings.
Guenther (This used to be commit b1bc7fd347978620eb8bc79dc253fab5b207a40b)
Diffstat (limited to 'source3')
-rw-r--r--source3/iniparser/src/dictionary.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/iniparser/src/dictionary.c b/source3/iniparser/src/dictionary.c
index 4381b9cb78..1f55cb4c24 100644
--- a/source3/iniparser/src/dictionary.c
+++ b/source3/iniparser/src/dictionary.c
@@ -114,11 +114,11 @@ dictionary * dictionary_new(int size)
/* If no size was specified, allocate space for DICTMINSZ */
if (size<DICTMINSZ) size=DICTMINSZ ;
- d = calloc(1, sizeof(dictionary));
+ d = (dictionary *)calloc(1, sizeof(dictionary));
d->size = size ;
- d->val = calloc(size, sizeof(char*));
- d->key = calloc(size, sizeof(char*));
- d->hash = calloc(size, sizeof(unsigned));
+ d->val = (char **)calloc(size, sizeof(char*));
+ d->key = (char **)calloc(size, sizeof(char*));
+ d->hash = (unsigned int *)calloc(size, sizeof(unsigned));
return d ;
}
@@ -316,9 +316,9 @@ void dictionary_set(dictionary * d, char * key, char * val)
if (d->n==d->size) {
/* Reached maximum size: reallocate blackboard */
- d->val = mem_double(d->val, d->size * sizeof(char*)) ;
- d->key = mem_double(d->key, d->size * sizeof(char*)) ;
- d->hash = mem_double(d->hash, d->size * sizeof(unsigned)) ;
+ d->val = (char **)mem_double(d->val, d->size * sizeof(char*)) ;
+ d->key = (char **)mem_double(d->key, d->size * sizeof(char*)) ;
+ d->hash = (unsigned int *)mem_double(d->hash, d->size * sizeof(unsigned)) ;
/* Double size */
d->size *= 2 ;