summaryrefslogtreecommitdiffstats
path: root/utils/cache_gc/db.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/cache_gc/db.c')
-rw-r--r--utils/cache_gc/db.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/cache_gc/db.c b/utils/cache_gc/db.c
index d164ea7b..3b4a75be 100644
--- a/utils/cache_gc/db.c
+++ b/utils/cache_gc/db.c
@@ -76,7 +76,7 @@ int kr_gc_key_consistent(knot_db_val_t key)
} else {
/* find the first double zero in the key */
for (i = 2; kd[i - 1] || kd[i - 2]; ++i) {
- if (!kr_assume(i < key.len))
+ if (kr_fails_assert(i < key.len))
return kr_error(EINVAL);
}
}
@@ -85,7 +85,7 @@ int kr_gc_key_consistent(knot_db_val_t key)
case 'E':
(void)0; // C can't have a variable definition following a label
uint16_t type;
- if (!kr_assume(i + 1 + sizeof(type) <= key.len))
+ if (kr_fails_assert(i + 1 + sizeof(type) <= key.len))
return kr_error(EINVAL);
memcpy(&type, kd + i + 1, sizeof(type));
return type;
@@ -96,7 +96,7 @@ int kr_gc_key_consistent(knot_db_val_t key)
case 'S': // the rtt_state entries are considered inconsistent, at least for now
return -1;
default:
- (void)!kr_assume(!EINVAL);
+ kr_assert(!EINVAL);
return kr_error(EINVAL);
}
}