From 39c9f1123006caa747e70df7f98019653b2f2924 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 27 Mar 2001 11:02:42 +0000 Subject: [PATCH] Load the default config file on first non-config option (several options require config to be loaded). --- lib/conf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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); } - -- 2.39.2