From b888ffcc653c3b59618c9ed8424e99bd57486389 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 15 Aug 2012 22:44:19 +0200 Subject: [PATCH] interactive.c: Return proper error on icom_set() failure. If an interactive set command fails, we currently reset the configuration to the default and return success. This is probably not what the user expected. Make the command fail instead. --- interactive.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/interactive.c b/interactive.c index 88a1bd5..8f94076 100644 --- a/interactive.c +++ b/interactive.c @@ -110,7 +110,6 @@ static int icom_reset(__a_unused char *line) static int icom_set(char *line) { - int ret; struct select_cmdline_parser_params params = { .override = 1, .initialize = 0, @@ -127,10 +126,7 @@ static int icom_set(char *line) fi = NULL; free(admissible_uids); admissible_uids = NULL; - ret = parse_select_options(line, ¶ms, &admissible_uids, &fi); - if (ret >= 0) - return ret; - return icom_reset(NULL); + return parse_select_options(line, ¶ms, &admissible_uids, &fi); } static int exec_interactive_command(char *line) -- 2.30.2