> Brent Cook wrote:
> > 
> > > On Feb 10, 2015, at 9:37 AM, Todd C. Miller <[email protected]> 
> > > wrote:
> > > 
> > > On Mon, 09 Feb 2015 22:32:55 -0600, Brent Cook wrote:
> > > 
> > >> Pretty trivial conversion. ok?
> > > 
> > > OK but size_t should be printed %zu (%zd is ssize_t).
> > > 
> > > - todd
> > > 
> > 
> > If I had known I would get so many emails over this, I would have just done 
> > %zu
> > in the first place :) I was just trying to keep them the same.
> > 
> 
> I don't think I've ever seen a size_t value in the wild that was:
> 1) larger than SIZE_MAX / 2
> 2) not the result of an error
> 
> Usually, if %zu vs %zd matters, it's because somebody screwed up and you
> actually are looking at a negative size_t. possible exception: -1 as a 
> sentinel.
> Either way, it may be desirable to make such numbers look negative.

Yeah, I agree.  Bugs are more likely to be fixed if people see -1.  More
people will know where to look.

Reply via email to