From f4d9600e6813f151350d9a89749ee4d12b62b842 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 18 Oct 2003 08:52:16 +0000 Subject: fixed spinlocks in tdb I still wouldn't recommend them, but at least they now work (This used to be commit 76992e7d1655ed15d61254f2be651db020ec4f5e) --- source3/tdb/spinlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/tdb/spinlock.c') 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; -- cgit