diff options
-rw-r--r-- | cfgdir.c | 4 | ||||
-rw-r--r-- | server.c | 6 |
2 files changed, 5 insertions, 5 deletions
@@ -235,9 +235,7 @@ scfg_valid_filename(const char *name) { const char *suffix; - if (!name) - return false; - if (name[0] == '\0') + if (empty_str(name)) return false; if (name[0] == '.') return false; @@ -93,7 +93,7 @@ server_delete_by_name(struct cfg *cfg, const char *name) { struct server *scfg; - if (!cfg || !name || name[0] == '\0') + if (!cfg || empty_str(name)) return; list_for_each_entry(scfg, &cfg->servers, list) { @@ -247,7 +247,9 @@ exec_cmd(struct cfg *cfg, struct server *scfg, const char *cmd) } } while (!WIFEXITED(wstatus)); - fprintf(stderr, "Child %s exited: %i\n", scfg->start_exec, WEXITSTATUS(wstatus)); + fprintf(stderr, "Child %s exited: %i\n", scfg->start_exec, + WEXITSTATUS(wstatus)); + if (WEXITSTATUS(wstatus) == 0) return true; else |