Skip to content

Commit 86ec6c4

Browse files
committed
fix macro MAX_SIZE
1 parent bd32d24 commit 86ec6c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libdispatch/nchashmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ NC_hashmapnew(size_t startsize)
175175
if(startsize == 0 || startsize < MINTABLESIZE)
176176
startsize = MINTABLESIZE;
177177
else {
178-
if(startsize > MAX_SIZE / 4){nullfree(hm);return 0;}
178+
if(startsize > (size_t - 1) / 4){nullfree(hm);return 0;}
179179
startsize *= 4;
180180
startsize /= 3;
181181
startsize = findPrimeGreaterThan(startsize);

0 commit comments

Comments
 (0)