[Drbd-dev] [PATCH 14/17] lru_cache: use braces on all arms of statement
Tobin C. Harding
me at tobin.cc
Mon Oct 2 00:34:13 CEST 2017
checkpatch emits CHECK: braces {} should be used on all arms of this
statement. Also unbalanced braces warning is emitted for this same
snippet.
Use braces on all arms of statement, clearing two checkpatch warnings.
Signed-off-by: Tobin C. Harding <me at tobin.cc>
---
lib/lru_cache.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/lru_cache.c b/lib/lru_cache.c
index a581b33..012c6b8 100644
--- a/lib/lru_cache.c
+++ b/lib/lru_cache.c
@@ -635,9 +635,9 @@ void lc_set(struct lru_cache *lc, unsigned int enr, int index)
e->lc_number = e->lc_new_number = enr;
hlist_del_init(&e->colision);
- if (enr == LC_FREE)
+ if (enr == LC_FREE) {
lh = &lc->free;
- else {
+ } else {
hlist_add_head(&e->colision, lc_hash_slot(lc, enr));
lh = &lc->lru;
}
--
2.7.4
More information about the drbd-dev
mailing list