[BusyBox] Patch with clean and remove bugs to m* utils

Larry Doolittle ldoolitt at recycle.lbl.gov
Wed Jan 31 18:56:42 UTC 2001


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.

      - Larry





More information about the busybox mailing list