From 1d9e7b614cf1cbbebe4dc482866a153781044ed4 Mon Sep 17 00:00:00 2001 From: Thomas Richter Date: Wed, 14 Apr 2021 09:20:59 +0200 Subject: [PATCH] cpumf/chcpumf: Use util_opt_print_parse_error function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use function util_opt_print_parse_error() instead of fprintf to stderr. Signed-off-by: Thomas Richter Signed-off-by: Jan Höppner --- cpumf/chcpumf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cpumf/chcpumf.c b/cpumf/chcpumf.c index 09d6e7cf..b0f88d4b 100644 --- a/cpumf/chcpumf.c +++ b/cpumf/chcpumf.c @@ -181,10 +181,8 @@ static int parse_args(int argc, char **argv) case 'V': verbose = 1; break; - case '?': - fprintf(stderr, "One or more options are not valid\n"); - fprintf(stderr, "Try 'chcpumf --help' for more" - " information\n"); + default: + util_opt_print_parse_error(opt, argv); exit(EXIT_FAILURE); } }