bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] mktemp, sort, tac: don't use undefined after mkstemp failure


From: Eric Blake
Subject: Re: [PATCH] mktemp, sort, tac: don't use undefined after mkstemp failure
Date: Thu, 14 Aug 2008 06:28:57 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Jim Meyering on 8/14/2008 6:12 AM:
|> | +      error (0, errno, _("cannot create temporary file in %s"),
|> | +            quote (temp_dir));
|> | +      exit (SORT_FAILURE);
|> | +    }
|>
|> Why not the single statement error (SORT_FAILURE, errno, _(...))?
|
| Without the file or directory name, it's harder
| to determine which file system is in question.

But that doesn't answer my question.  error(SORT_FAILURE,...) will call
exit(SORT_FAILURE) on your behalf, since SORT_FAILURE is non-zero.  In
other words, why not let error() do the exiting, for less code on your side?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkikJQkACgkQ84KuGfSFAYAt6ACgzHBxKD+kNepdJPkKFLotYUhB
0HsAn2gliMht+4pqGbFl1FrLWenol5xR
=wWhQ
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]