diff --git a/doc/Changelog b/doc/Changelog index e562f6c08..7b821d7d7 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -4,6 +4,7 @@ The type on several OSes ranges from int, int32, uint32, size_t. Detects unsigned or signed using math trick. - constants for DNS flags. + - compilation without locks fixup. 2 April 2007: Wouter - check sizes of udp received messages, not too short. diff --git a/util/storage/lruhash.c b/util/storage/lruhash.c index 3db99d82b..4574574c2 100644 --- a/util/storage/lruhash.c +++ b/util/storage/lruhash.c @@ -351,9 +351,8 @@ lruhash_lookup(struct lruhash* table, hashvalue_t hash, void* key, int wr) lock_quick_unlock(&table->lock); if(entry) { - if(wr) - lock_rw_wrlock(&entry->lock); - else lock_rw_rdlock(&entry->lock); + if(wr) { lock_rw_wrlock(&entry->lock); } + else { lock_rw_rdlock(&entry->lock); } } lock_quick_unlock(&bin->lock); return entry;