[darcs-devel] Re: darcs patch: Don't use hardcoded stdout fd number and check return ...

Jan-Benedict Glaw jbglaw at lug-owl.de
Mon Jan 24 23:50:04 PST 2005


On Tue, 2005-01-25 00:01:09 +0000, Aaron Denney <wnoise at ofb.net>
wrote in message <slrncvb328.vng.wnoise at ofb.net>:
> On 2005-01-24, Jan-Benedict Glaw <jbglaw at lug-owl.de> wrote:
> > --=_
> > Content-Type: text/plain
> > Content-Transfer-Encoding: quoted-printable
> >
> > Mon Jan 24 21:38:26 CET 2005  Jan-Benedict Glaw <jbglaw at lug-owld.e>
> >   * Don't use hardcoded stdout fd number and check return value
> 
> Checking the return value is good, but why not hard-code the
> STDOUT_FILENO?  It can't change, and everybody knows what "1" means,
> and it's shorter.

exit()ing with 0 is basically the same thing, but I'd ever use
EXIT_SUCCESS (which of course is defined to 0). So if there's a define
for something, I tend to use instead of whatever hardcoded value should
be well-known by anybode :-)

Maybe I'd split the patch into two and then continue discussion?

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw at lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20050125/0b0b205e/attachment.pgp


More information about the darcs-devel mailing list