This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]