logoalt Hacker News

dn3500today at 8:32 AM1 replyview on HN

Your test is backwards. I would write it like this:

  if (size > a->limit - a->cursor) return NULL;

Replies

CodesInChaostoday at 8:35 AM

You're right. Fixed.