summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cfgdir.c4
-rw-r--r--server.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/cfgdir.c b/cfgdir.c
index 6f01189..f529cbe 100644
--- a/cfgdir.c
+++ b/cfgdir.c
@@ -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;
diff --git a/server.c b/server.c
index d51e127..04eba66 100644
--- a/server.c
+++ b/server.c
@@ -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