From 0f94e34414a5c55e4d788de7c0afd4d3fcef865a Mon Sep 17 00:00:00 2001 From: struct Date: Mon, 30 May 2022 16:14:22 -0400 Subject: [PATCH] remove redundant check and fix comment --- src/iso_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/iso_alloc.c b/src/iso_alloc.c index d774bb2..5fd6264 100644 --- a/src/iso_alloc.c +++ b/src/iso_alloc.c @@ -652,7 +652,7 @@ INTERNAL_HIDDEN iso_alloc_zone_t *iso_new_zone(size_t size, bool internal) { /* Requires the root is locked */ INTERNAL_HIDDEN iso_alloc_zone_t *_iso_new_zone(size_t size, bool internal, int32_t index) { - if(UNLIKELY(_root->zones_used >= MAX_ZONES) || UNLIKELY(index > 0 && index >= MAX_ZONES)) { + if(UNLIKELY(_root->zones_used >= MAX_ZONES) || UNLIKELY(index >= MAX_ZONES)) { LOG_AND_ABORT("Cannot allocate additional zones. I have already allocated %d", _root->zones_used); } @@ -826,7 +826,7 @@ INTERNAL_HIDDEN iso_alloc_zone_t *_iso_new_zone(size_t size, bool internal, int3 zone_lookup_table[size] = new_zone->index; } else { /* If this was a zone replacement then its next_sz_index - * is in tact and we can leave it alone */ + * is intact and we can leave it alone */ if(index < 0) { /* Other zones exist that hold this size. We need to * fixup the most recent ones next_sz_index member.