From 7956fe75112de7ff7439929dcbdbc6a3fe75f77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= <vladimir.cunat@nic.cz> Date: Thu, 27 Jun 2019 16:50:13 +0200 Subject: [PATCH] gc: fix a lint warning I think the condition is still quite well readable even though much shorter than my original !(kd[i - 1] == 0 && kd[i - 2] == 0) --- utils/cache_gc/db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/cache_gc/db.c b/utils/cache_gc/db.c index 07fccf0a1..8d5c43f9c 100644 --- a/utils/cache_gc/db.c +++ b/utils/cache_gc/db.c @@ -87,7 +87,7 @@ const uint16_t *kr_gc_key_consistent(knot_db_val_t key) i = 1; } else { /* find the first double zero in the key */ - for (i = 2; !kd[i - 1] == 0 || !kd[i - 2] == 0; ++i) { + for (i = 2; kd[i - 1] || kd[i - 2]; ++i) { if (i >= key.len) return NULL; } -- GitLab