diff options
author | Maria Matejka <mq@ucw.cz> | 2022-10-11 11:06:58 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-10-12 10:05:14 +0200 |
commit | b83a9d5f9a93d6b01d4b06429195e4508377504c (patch) | |
tree | b256e1b69c719f4445d1288c9ebe4f6e6c094aef | |
parent | 02dc89555032c2e045e6910fbc6ee2c45d03a41a (diff) |
Limited value must never go under zero
-rw-r--r-- | nest/limit.h | 1 |
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; } |