#if HAVE_MMAP
if (tdb->map_ptr) {
- int ret = munmap(tdb->map_ptr, tdb->map_size);
+ int ret;
+
+ ret = munmap(tdb->map_ptr, tdb->map_size);
if (ret != 0)
return ret;
}
unsigned char *buf;
/* some systems don't like zero length malloc */
+
if (!(buf = (unsigned char *)malloc(len ? len : 1))) {
/* Ensure ecode is set for log fn. */
tdb->ecode = TDB_ERR_OOM;
tdb_next_hash_chain,
tdb_oob,
tdb_expand_file,
- tdb_brlock,
- tdb_brunlock
};
/*