]> mj.ucw.cz Git - libucw.git/commitdiff
Don't load the default config file when an invalid option error is going
authorMartin Mares <mj@ucw.cz>
Mon, 24 Apr 2006 21:32:06 +0000 (23:32 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 24 Apr 2006 21:32:06 +0000 (23:32 +0200)
to be reported.

lib/conf2.c

index e87408fa85c635d006c5a7939f5ba5eb4ab907e9..e32960f75c2f411ecafbd2e9898679ad762df816 100644 (file)
@@ -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;
     }