summaryrefslogtreecommitdiff
path: root/nest/limit.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-10-11 11:06:58 +0200
committerMaria Matejka <mq@ucw.cz>2022-10-12 10:05:14 +0200
commitb83a9d5f9a93d6b01d4b06429195e4508377504c (patch)
treeb256e1b69c719f4445d1288c9ebe4f6e6c094aef /nest/limit.h
parent02dc89555032c2e045e6910fbc6ee2c45d03a41a (diff)
Limited value must never go under zero
Diffstat (limited to 'nest/limit.h')
-rw-r--r--nest/limit.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/nest/limit.h b/nest/limit.h
index 5838ad3b..f8d4b212 100644
--- a/nest/limit.h
+++ b/nest/limit.h
@@ -32,6 +32,7 @@ static inline int limit_push(struct limit *l, void *data)
static inline void limit_pop(struct limit *l)
{
+ ASSERT_DIE(l->count > 0);
--l->count;
}