diff options
Diffstat (limited to 'source3/tdb/tdb.c')
-rw-r--r-- | source3/tdb/tdb.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index bc7c90613c..31d4d0dfcc 100644 --- a/source3/tdb/tdb.c +++ b/source3/tdb/tdb.c @@ -35,7 +35,7 @@ #include "includes.h" #endif -#define TDB_VERSION (0x26011967 + 2) +#define TDB_VERSION (0x26011967 + 3) #define TDB_MAGIC (0x26011999U) #define TDB_FREE_MAGIC (~TDB_MAGIC) #define TDB_ALIGN 4 @@ -43,8 +43,7 @@ #define DEFAULT_HASH_SIZE 131 #define TDB_PAGE_SIZE 0x2000 #define TDB_LEN_MULTIPLIER 10 -#define TDB_RESERVED 1024 -#define FREELIST_TOP (TDB_RESERVED + sizeof(struct tdb_header)) +#define FREELIST_TOP (sizeof(struct tdb_header)) #define LOCK_SET 1 #define LOCK_CLEAR 0 @@ -498,7 +497,6 @@ static int tdb_new_database(TDB_CONTEXT *tdb, int hash_size) tdb_off offset; int i, size = 0; tdb_off buf[16]; - char buf2[TDB_RESERVED]; /* create the header */ memset(&header, 0, sizeof(header)); @@ -516,13 +514,6 @@ static int tdb_new_database(TDB_CONTEXT *tdb, int hash_size) return -1; } else size += sizeof(header); - memset(buf2, 0, sizeof(buf2)); - if (tdb->fd != -1 && write(tdb->fd, buf2, TDB_RESERVED) != - TDB_RESERVED) { - tdb->ecode = TDB_ERR_IO; - return -1; - } else size += TDB_RESERVED; - /* the freelist and hash pointers */ offset = 0; memset(buf, 0, sizeof(buf)); |