]> mj.ucw.cz Git - libucw.git/commitdiff
Load the default config file on first non-config option (several options
authorMartin Mares <mj@ucw.cz>
Tue, 27 Mar 2001 11:02:42 +0000 (11:02 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 27 Mar 2001 11:02:42 +0000 (11:02 +0000)
require config to be loaded).

lib/conf.c

index c96d9fb304cd71e029eab9353e4abdbde4baab8f..9e52cf275a12db022e231e41a48eb976841824c5 100644 (file)
@@ -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);
 }
-