From: Vladimír Čunát Date: Thu, 27 Jun 2019 14:50:13 +0000 (+0200) Subject: gc: fix a lint warning X-Git-Tag: v4.1.0~8^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7956fe75112de7ff7439929dcbdbc6a3fe75f77a;p=thirdparty%2Fknot-resolver.git 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) --- 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; }