[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Findutils-patches] [PATCH] Fix misleading error message when argume
From: |
Eric Blake |
Subject: |
Re: [Findutils-patches] [PATCH] Fix misleading error message when argument to find -user is missing/unknown. |
Date: |
Mon, 22 Dec 2008 05:53:23 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081105 Thunderbird/2.0.0.18 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to address@hidden 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?
> 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.
> + quotearg_n_style (0, options.err_quoting_style,
> + username));
> + }
> + else
> + {
> + error (1, 0, _("The argument to -user should not be empty."));
Likewise.
- --
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
iEYEARECAAYFAklPjcMACgkQ84KuGfSFAYBtQwCfRSOdrKXp4cyHeDjCtkKhQ7Jb
VJcAnjce2fEJecdjSRwV1N3Pz8UpUweU
=Hq7O
-----END PGP SIGNATURE-----