diff --git a/awesome.c b/awesome.c index 321d98e4..4e0775f8 100644 --- a/awesome.c +++ b/awesome.c @@ -513,7 +513,8 @@ main(int argc, char **argv) spawn_init(); /* Parse and run configuration file */ - luaA_parserc(&xdg, confpath, true); + if (!luaA_parserc(&xdg, confpath, true)) + fatal("couldn't find any rc file"); xdgWipeHandle(&xdg); diff --git a/luaa.c b/luaa.c index 46dbee20..fb173c7b 100644 --- a/luaa.c +++ b/luaa.c @@ -835,7 +835,7 @@ luaA_parserc(xdgHandle* xdg, const char *confpatharg, bool run) char *tmp = confpath; /* confpath is "string1\0string2\0string3\0\0" */ - do + while(*tmp) { if(luaA_loadrc(tmp, run)) { @@ -845,7 +845,7 @@ luaA_parserc(xdgHandle* xdg, const char *confpatharg, bool run) else if(!run) goto bailout; tmp += a_strlen(tmp) + 1; - } while(*tmp != 0); + } bailout: