On Mon, Dec 22, 2008 at 12:53 PM, Eric Blake <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to [email protected] on 12/22/2008 2:49 AM:
>> if (uid_len && (username[uid_len]==0))
>> - uid = safe_atoi (username);
>> + {
>> + uid = safe_atoi (username);
>> + }
>
> Why the introduction of {} here?
Because the else-clause grew braces too. I prefer to keep those
balanced. Specifically, I use the no-brace construct
if (foo)
bar;
else
baz;
... only when both bar and baz are simple (not compound) statements.
>
>> else
>> - return false;
>> + {
>> + /* This is a fatal error (if we just return false, the caller
>> + * will say "invalid argument `username' to -user", which is
>> + * not as helpful). */
>> + if (username[0])
>> + {
>> + error (1, 0, _("%s is not the name of a known user."),
>
> GNU Coding Standards recommend that messages end without a trailing period.
Thanks for spotting that. Removed.
>> + error (1, 0, _("The argument to -user should not be
>> empty."));
>
> Likewise.
Also removed.
I pushed the result. Thanks for the comments.
James.
_______________________________________________
Findutils-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/findutils-patches