svn commit: samba r18921 - in
branches/SAMBA_3_0/source/iniparser/src: .
gd at samba.org
gd at samba.org
Tue Sep 26 16:26:18 GMT 2006
Author: gd
Date: 2006-09-26 16:26:17 +0000 (Tue, 26 Sep 2006)
New Revision: 18921
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18921
Log:
Fix some c++ warnings.
Guenther
Modified:
branches/SAMBA_3_0/source/iniparser/src/dictionary.c
Changeset:
Modified: branches/SAMBA_3_0/source/iniparser/src/dictionary.c
===================================================================
--- branches/SAMBA_3_0/source/iniparser/src/dictionary.c 2006-09-26 15:23:59 UTC (rev 18920)
+++ branches/SAMBA_3_0/source/iniparser/src/dictionary.c 2006-09-26 16:26:17 UTC (rev 18921)
@@ -114,11 +114,11 @@
/* 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 @@
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 ;
More information about the samba-cvs
mailing list