Skip to content

Commit ae1ce38

Browse files
committed
Merge branch 'ps/more-sign-compare' into seen
More -Wsign-compare fixes. * ps/more-sign-compare: sign-compare: avoid comparing ptrdiff with an int/unsigned
2 parents 4e7b820 + 2402725 commit ae1ce38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shallow.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ static uint32_t *paint_alloc(struct paint_info *info)
534534
unsigned nr = DIV_ROUND_UP(info->nr_bits, 32);
535535
unsigned size = nr * sizeof(uint32_t);
536536
void *p;
537-
if (!info->pool_count || size > info->end - info->free) {
537+
if (!info->pool_count || info->end < info->free + size) {
538538
if (size > POOL_SIZE)
539539
BUG("pool size too small for %d in paint_alloc()",
540540
size);

0 commit comments

Comments
 (0)