From b82d6ab855c838b5e0092e7e38d7351e843096b7 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 21 Oct 1995 00:27:38 +0000 Subject: (parse_enum): Use argp_error. --- utils/ps.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'utils') 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; } -- cgit v1.2.3