[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] Patch with clean and remove bugs to m* utils
From:       Matt Kraai <kraai () alumni ! carnegiemellon ! edu>
Date:       2001-01-31 19:21:30
[Download RAW message or body]

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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic