From: Martin Mares Date: Tue, 27 Mar 2001 11:02:42 +0000 (+0000) Subject: Load the default config file on first non-config option (several options X-Git-Tag: holmes-import~1500 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=39c9f1123006caa747e70df7f98019653b2f2924;p=libucw.git Load the default config file on first non-config option (several options require config to be loaded). --- diff --git a/lib/conf.c b/lib/conf.c index c96d9fb3..9e52cf27 100644 --- a/lib/conf.c +++ b/lib/conf.c @@ -255,13 +255,11 @@ int cf_getopt(int argc,char * const argv[], }else if(res=='C'){ cf_read(optarg); - }else if(res==-1){ + }else{ + /* unhandled option or end of options */ if(cfdeffile) cf_read(cfdeffile); return res; - }else{ /* unhandled option */ - return res; } }while(1); } -