From f3e13632813c543583fe1d04203825743aa99111 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 11 Aug 2007 21:19:24 +0000 Subject: r24336: Use standard data type uint32_t rather than tdb-specific u32. (This used to be commit f90a698387c53508862eb6359bd4d1fba1d2b4b0) --- source4/lib/tdb/common/open.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/lib/tdb/common/open.c') diff --git a/source4/lib/tdb/common/open.c b/source4/lib/tdb/common/open.c index edb0a50916..0bd1c91a5e 100644 --- a/source4/lib/tdb/common/open.c +++ b/source4/lib/tdb/common/open.c @@ -34,8 +34,8 @@ static struct tdb_context *tdbs = NULL; /* This is based on the hash algorithm from gdbm */ static unsigned int default_tdb_hash(TDB_DATA *key) { - u32 value; /* Used to compute the hash value. */ - u32 i; /* Used to cycle through random values. */ + uint32_t value; /* Used to compute the hash value. */ + uint32_t i; /* Used to cycle through random values. */ /* Set the initial value from the key size. */ for (value = 0x238F13AF * key->dsize, i=0; i < key->dsize; i++) @@ -151,7 +151,7 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags, struct stat st; int rev = 0, locked = 0; unsigned char *vp; - u32 vertest; + uint32_t vertest; if (!(tdb = (struct tdb_context *)calloc(1, sizeof *tdb))) { /* Can't log this */ @@ -249,8 +249,8 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags, rev = (tdb->flags & TDB_CONVERT); } vp = (unsigned char *)&tdb->header.version; - vertest = (((u32)vp[0]) << 24) | (((u32)vp[1]) << 16) | - (((u32)vp[2]) << 8) | (u32)vp[3]; + vertest = (((uint32_t)vp[0]) << 24) | (((uint32_t)vp[1]) << 16) | + (((uint32_t)vp[2]) << 8) | (uint32_t)vp[3]; tdb->flags |= (vertest==TDB_VERSION) ? TDB_BIGENDIAN : 0; if (!rev) tdb->flags &= ~TDB_CONVERT; -- cgit