From: Andre Noll Date: Wed, 15 Aug 2012 20:44:19 +0000 (+0200) Subject: interactive.c: Return proper error on icom_set() failure. X-Git-Tag: v1.0.0~17 X-Git-Url: http://git.tuebingen.mpg.de/?p=adu.git;a=commitdiff_plain;h=b888ffcc653c3b59618c9ed8424e99bd57486389 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. --- 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)