[PATCH v4] [BZ #12836] Make fmemopen(buf,size,"w+b") binary.

Ondřej Bílka neleai@seznam.cz
Sat Jun 1 13:00:00 GMT 2013


On Wed, May 29, 2013 at 03:32:49PM -0700, Roland McGrath wrote:
> > Added comments except
> > 
> > On Thu, May 23, 2013 at 12:09:12PM -0700, Roland McGrath wrote:
> > > > +	for (i = 0 ; i < strlen (s) ; i++)
> > > 
> > > Use sizeof.  No spaces before ;.
> > Here strlen is rigth in case that in future tests s contains 0.
> 
> What "future tests"?  This is the program.  It does what it does.
> If later you change it to do something different, then change it.
> 
On closer look sizeof here is off by one error.



More information about the Libc-alpha mailing list