]> mj.ucw.cz Git - libucw.git/blobdiff - lib/conf.c
Load the default config file on first non-config option (several options
[libucw.git] / 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);
 }
-