diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-07-30 10:42:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:25 -0500 |
commit | 5a5deade6e4634aad561139f39337c9a960c0b80 (patch) | |
tree | 9907286b6e90ac4dfbbdf1194c08c99cd07701e7 /source3/tdb/tdb.c | |
parent | 2c6030415e0b1f421ea6e85fe6ffe7389ee7a941 (diff) | |
download | samba-5a5deade6e4634aad561139f39337c9a960c0b80.tar.gz samba-5a5deade6e4634aad561139f39337c9a960c0b80.tar.bz2 samba-5a5deade6e4634aad561139f39337c9a960c0b80.zip |
r17315: Make talloc and tdb C++-warning-free. Would this also be interesting in talloc
and tdb "upstream"?
Volker
(This used to be commit 68c43191c8aa4faa9801e0ab084a216ceaf4379d)
Diffstat (limited to 'source3/tdb/tdb.c')
-rw-r--r-- | source3/tdb/tdb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index 1fae6b6de1..524d404a50 100644 --- a/source3/tdb/tdb.c +++ b/source3/tdb/tdb.c @@ -355,9 +355,10 @@ int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf) dbuf = tdb_fetch(tdb, key); if (dbuf.dptr == NULL) { - dbuf.dptr = malloc(new_dbuf.dsize); + dbuf.dptr = (char *)malloc(new_dbuf.dsize); } else { - dbuf.dptr = realloc(dbuf.dptr, dbuf.dsize + new_dbuf.dsize); + dbuf.dptr = (char *)realloc(dbuf.dptr, + dbuf.dsize + new_dbuf.dsize); } if (dbuf.dptr == NULL) { |