summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-10-21 00:27:38 +0000
committerMiles Bader <miles@gnu.org>1995-10-21 00:27:38 +0000
commitb82d6ab855c838b5e0092e7e38d7351e843096b7 (patch)
tree44e692cefef93b1475ed4ce9f38b3fd3077387b2 /utils
parent0b46a52e014cb65e2e8e8f5e01612b485b3589e3 (diff)
(parse_enum): Use argp_error.
Diffstat (limited to 'utils')
-rw-r--r--utils/ps.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/utils/ps.c b/utils/ps.c
index a3ff26d0..4729a17b 100644
--- a/utils/ps.c
+++ b/utils/ps.c
@@ -110,21 +110,14 @@ parse_enum(char *arg, char **choices, char *kind, bool allow_mismatches)
{
if (strncmp(*p, arg, arglen) == 0)
if (partial_match >= 0)
- {
- fprintf(stderr, "%s: Ambiguous %s", arg, kind);
- argp_help (0, stderr, ARGP_HELP_STD_ERR);
- }
+ argp_error (0, "%s: Ambiguous %s", arg, kind);
else
partial_match = p - choices;
p++;
}
if (partial_match < 0 && !allow_mismatches)
- {
- fprintf(stderr, "%s: Invalid %s", arg, kind);
- argp_help (0, stderr, ARGP_HELP_STD_ERR);
- return 0;
- }
+ argp_error (0, "%s: Invalid %s", arg, kind);
return partial_match;
}