summaryrefslogtreecommitdiff
path: root/source3/tdb/spinlock.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-10-18 08:52:16 +0000
committerAndrew Tridgell <tridge@samba.org>2003-10-18 08:52:16 +0000
commitf4d9600e6813f151350d9a89749ee4d12b62b842 (patch)
tree54ed914a9efc59f19a75ad572d70e794c48d4626 /source3/tdb/spinlock.c
parent8c4e25a331bb9e72374202378340b2acd525adce (diff)
downloadsamba-f4d9600e6813f151350d9a89749ee4d12b62b842.tar.gz
samba-f4d9600e6813f151350d9a89749ee4d12b62b842.tar.bz2
samba-f4d9600e6813f151350d9a89749ee4d12b62b842.zip
fixed spinlocks in tdb
I still wouldn't recommend them, but at least they now work (This used to be commit 76992e7d1655ed15d61254f2be651db020ec4f5e)
Diffstat (limited to 'source3/tdb/spinlock.c')
-rw-r--r--source3/tdb/spinlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/tdb/spinlock.c b/source3/tdb/spinlock.c
index 2370ce3bdd..3fddeafb2c 100644
--- a/source3/tdb/spinlock.c
+++ b/source3/tdb/spinlock.c
@@ -372,7 +372,7 @@ int tdb_create_rwlocks(int fd, unsigned int hash_size)
unsigned size, i;
tdb_rwlock_t *rwlocks;
- size = (hash_size + 1) * sizeof(tdb_rwlock_t);
+ size = TDB_SPINLOCK_SIZE(hash_size);
rwlocks = malloc(size);
if (!rwlocks)
return -1;