Skip to content

Commit

Permalink
Merge branch 'ps/more-sign-compare' into seen
Browse files Browse the repository at this point in the history
* ps/more-sign-compare:
  sign-compare: avoid comparing ptrdiff with an int/unsigned
  • Loading branch information
gitster committed Dec 27, 2024
2 parents 7d53c30 + 2402725 commit bca6fd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shallow.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ static uint32_t *paint_alloc(struct paint_info *info)
unsigned nr = DIV_ROUND_UP(info->nr_bits, 32);
unsigned size = nr * sizeof(uint32_t);
void *p;
if (!info->pool_count || size > info->end - info->free) {
if (!info->pool_count || info->end < info->free + size) {
if (size > POOL_SIZE)
BUG("pool size too small for %d in paint_alloc()",
size);
Expand Down

0 comments on commit bca6fd9

Please sign in to comment.