Paolo Bonzini wrote: > On 07/04/2011 03:46 PM, Jim Meyering wrote: >> Finally, to avoid the risk of error with negative "index", I suggest to >> change the semantics by incrementing that argument by 1 at each macro use >> and changing the name to "n_items". > > At this point, and if we stick with unsigned types for sizes, the > assertion on 0 < (n_required) becomes pointless (it should become 0 <= > (n_required) and that is always true for unsigned types). It even > gets in the way when applying REALLOC_IF_NECESSARY to the copy > function, because it is sometimes called with a zero-element source. > What about removing the assertion altogether?
Yes, definitely remove it. Otherwise, I suspect it'd provoke a warning about the always-true expression.
