From: Martin Mares Date: Mon, 24 Apr 2006 21:32:06 +0000 (+0200) Subject: Don't load the default config file when an invalid option error is going X-Git-Tag: holmes-import~645^2~11^2~51 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b6730f024f461a46f523cf7cfcf3de9f7866aa7d;p=libucw.git Don't load the default config file when an invalid option error is going to be reported. --- diff --git a/lib/conf2.c b/lib/conf2.c index e87408fa..e32960f7 100644 --- a/lib/conf2.c +++ b/lib/conf2.c @@ -1353,7 +1353,8 @@ cf_get_opt(int argc, char * const argv[], const char *short_opts, const struct o } } else { /* unhandled option or end of options */ - load_default(); + if (res == -1) + load_default(); other_options++; return res; }