summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/common/open.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-11 21:19:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:01:39 -0500
commitf3e13632813c543583fe1d04203825743aa99111 (patch)
tree0a58e5663e663a6cdd409872787c9cc4ed591e4d /source4/lib/tdb/common/open.c
parentf1f4f665b01aec093de9e93f399070f44f65a551 (diff)
downloadsamba-f3e13632813c543583fe1d04203825743aa99111.tar.gz
samba-f3e13632813c543583fe1d04203825743aa99111.tar.bz2
samba-f3e13632813c543583fe1d04203825743aa99111.zip
r24336: Use standard data type uint32_t rather than tdb-specific u32.
(This used to be commit f90a698387c53508862eb6359bd4d1fba1d2b4b0)
Diffstat (limited to 'source4/lib/tdb/common/open.c')
-rw-r--r--source4/lib/tdb/common/open.c10
1 files changed, 5 insertions, 5 deletions
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;