From 089ce1cc3d018307f9817bf6bd680f8f09f7a17c Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 10 Oct 2015 00:19:09 +0200 Subject: [PATCH] Print new values only once successfully set --- tools/configctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configctl.c b/tools/configctl.c index dbb155d..8b35572 100644 --- a/tools/configctl.c +++ b/tools/configctl.c @@ -97,9 +97,9 @@ static int _configctl_do(Config * config, int verbose, char const * section, } else if(value != NULL) { - _configctl_print(verbose, section, key, value); if(config_set(config, section, key, value) != 0) return -_configctl_error(PROGNAME, 1); + _configctl_print(verbose, section, key, value); } else return -_configctl_error(PROGNAME, 1);