diff options
Diffstat (limited to 'cfgdir.c')
-rw-r--r-- | cfgdir.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -244,10 +244,10 @@ scfg_parse(struct cfg *cfg, struct server *server) switch (key) { case SCFG_KEY_TYPE: - if (!strcmp(value.str, "proxy")) { + if (streq(value.str, "proxy")) { if (!server_set_type(cfg, server, SERVER_TYPE_PROXY)) return; - } else if (!strcmp(value.str, "announce")) { + } else if (streq(value.str, "announce")) { if (!server_set_type(cfg, server, SERVER_TYPE_ANNOUNCE)) return; } @@ -281,23 +281,23 @@ scfg_parse(struct cfg *cfg, struct server *server) break; case SCFG_KEY_STOP_METHOD: - if (!strcmp(value.str, "exec")) { + if (streq(value.str, "exec")) { if (server_set_stop_method(cfg, server, SERVER_STOP_METHOD_EXEC)) break; - } else if (!strcmp(value.str, "rcon")) { + } else if (streq(value.str, "rcon")) { if (server_set_stop_method(cfg, server, SERVER_STOP_METHOD_RCON)) break; - } else if (!strcmp(value.str, "systemd")) { + } else if (streq(value.str, "systemd")) { if (server_set_stop_method(cfg, server, SERVER_STOP_METHOD_SYSTEMD)) break; } return; case SCFG_KEY_START_METHOD: - if (!strcmp(value.str, "exec")) { + if (streq(value.str, "exec")) { if (server_set_start_method(cfg, server, SERVER_START_METHOD_EXEC)) break; - } else if (!strcmp(value.str, "systemd")) { + } else if (streq(value.str, "systemd")) { if (server_set_start_method(cfg, server, SERVER_START_METHOD_SYSTEMD)) break; } @@ -384,7 +384,7 @@ scfg_valid_filename(const char *name) return false; if ((suffix = strrchr(name, '.')) == NULL) return false; - if (strcmp(suffix, ".server")) + if (!streq(suffix, ".server")) return false; return true; |