Skip to content

Commit 861d89c

Browse files
authored
Merge pull request #95 from struct/5_30_2022_fixes
remove redundant check and fix comment
2 parents f194b80 + 0f94e34 commit 861d89c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/iso_alloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ INTERNAL_HIDDEN iso_alloc_zone_t *iso_new_zone(size_t size, bool internal) {
652652

653653
/* Requires the root is locked */
654654
INTERNAL_HIDDEN iso_alloc_zone_t *_iso_new_zone(size_t size, bool internal, int32_t index) {
655-
if(UNLIKELY(_root->zones_used >= MAX_ZONES) || UNLIKELY(index > 0 && index >= MAX_ZONES)) {
655+
if(UNLIKELY(_root->zones_used >= MAX_ZONES) || UNLIKELY(index >= MAX_ZONES)) {
656656
LOG_AND_ABORT("Cannot allocate additional zones. I have already allocated %d", _root->zones_used);
657657
}
658658

@@ -826,7 +826,7 @@ INTERNAL_HIDDEN iso_alloc_zone_t *_iso_new_zone(size_t size, bool internal, int3
826826
zone_lookup_table[size] = new_zone->index;
827827
} else {
828828
/* If this was a zone replacement then its next_sz_index
829-
* is in tact and we can leave it alone */
829+
* is intact and we can leave it alone */
830830
if(index < 0) {
831831
/* Other zones exist that hold this size. We need to
832832
* fixup the most recent ones next_sz_index member.

0 commit comments

Comments
 (0)