diff options
author | Volker Lendecke <vl@samba.org> | 2008-01-16 20:29:41 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-16 20:29:41 +0100 |
commit | c308d76305d0a598ce03c516ff0c3b3a8875c89c (patch) | |
tree | 1f3adc7fadd2a5a26effaf45a5954f383def0e94 /source3/lib/tdb/common | |
parent | b0950557f90129b5cd51faf74dbf5d58a8f4d6b9 (diff) | |
download | samba-c308d76305d0a598ce03c516ff0c3b3a8875c89c.tar.gz samba-c308d76305d0a598ce03c516ff0c3b3a8875c89c.tar.bz2 samba-c308d76305d0a598ce03c516ff0c3b3a8875c89c.zip |
Fix some C++ warnings
(This used to be commit 625241c4773ae5c80dd0cb0c07a86aff633c1ede)
Diffstat (limited to 'source3/lib/tdb/common')
-rw-r--r-- | source3/lib/tdb/common/transaction.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/lib/tdb/common/transaction.c b/source3/lib/tdb/common/transaction.c index ea0e3a93f3..c3e7a4e2c0 100644 --- a/source3/lib/tdb/common/transaction.c +++ b/source3/lib/tdb/common/transaction.c @@ -219,9 +219,12 @@ static int transaction_write(struct tdb_context *tdb, tdb_off_t off, uint8_t **new_blocks; /* expand the blocks array */ if (tdb->transaction->blocks == NULL) { - new_blocks = malloc((blk+1)*sizeof(uint8_t *)); + new_blocks = (uint8_t **)malloc( + (blk+1)*sizeof(uint8_t *)); } else { - new_blocks = realloc(tdb->transaction->blocks, (blk+1)*sizeof(uint8_t *)); + new_blocks = (uint8_t **)realloc( + tdb->transaction->blocks, + (blk+1)*sizeof(uint8_t *)); } if (new_blocks == NULL) { tdb->ecode = TDB_ERR_OOM; |