[BusyBox] Patch with clean and remove bugs to m* utils
Matt Kraai
kraai at alumni.carnegiemellon.edu
Wed Jan 31 19:21:30 UTC 2001
On Wed, Jan 31, 2001 at 10:56:42AM -0800, Larry Doolittle wrote:
> Erik and Vladimir conversed thusly:
> > > > --- utility.c 2001/01/30 18:03:11 1.194
> > > > +++ utility.c 2001/01/31 17:45:07
> > > > @@ -105,6 +105,7 @@ extern void error_msg(const char *s, ...
> > > > va_start(p, s);
> > > > verror_msg(s, p);
> > > > va_end(p);
> > > > + write(fileno(stderr), "\n", 1);
> > >
> > > putc('\n', stderr) not best? ;00
> > Hmm. I expect that
> > putc('\n', stderr);
> > or
> > write(2, "\n", 1);
> > will produce equivalent code size.
>
> Using write() in this context mixes FILE * operations with raw
> file descriptor operations. While the write() version _should_
> work with all currently supported libcs, I recommend the putc()
> version, for long-term robustness in the face of non-standard libcs.
I agree with this, which is why I committed it using putc.
Matt
More information about the busybox
mailing list