summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
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;
}