From: Martin Mares Date: Wed, 4 Mar 2009 11:32:32 +0000 (+0100) Subject: Config: When cf_getopt() reports an error, do not commit config. X-Git-Tag: holmes-import~32 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=c990a38bac73f158715c17d49544bc93d94c3ea6;p=libucw.git Config: When cf_getopt() reports an error, do not commit config. In such situations, the configuration sections need not be initialized properly. --- diff --git a/ucw/conf-input.c b/ucw/conf-input.c index e0ef334d..fed6a828 100644 --- a/ucw/conf-input.c +++ b/ucw/conf-input.c @@ -499,9 +499,10 @@ cf_getopt(int argc, char * const argv[], const char *short_opts, const struct op #endif } else { /* unhandled option or end of options */ - if (res != ':' && res != '?') + if (res != ':' && res != '?') { load_default(); - final_commit(); + final_commit(); + } other_options++; return res; }