From f262c2c0511df1bd3694e16f5dfa0d4a3306bca7 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Tue, 3 Apr 2007 09:43:20 +0000 Subject: [PATCH] compile fixup. git-svn-id: file:///svn/unbound/trunk@215 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 1 + util/storage/lruhash.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) 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; -- 2.47.2