diff options
author | David Härdeman <david@hardeman.nu> | 2020-06-21 00:06:29 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2020-06-21 00:06:29 +0200 |
commit | ae48dc3b3caeef7eaa4a079b11cdda988d9c1f0d (patch) | |
tree | 2b9ec4898b7fd71ae3551ee72f7891640dec5c07 /main.c | |
parent | ab51ac11e68ce0b075688bf17fc89e0ba645b2ed (diff) |
Add streq and strcaseeq and use them throughout
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -104,7 +104,7 @@ msg(enum debug_lvl lvl, const char *fmt, va_list ap) break; } - if (!strcmp(e, "dumb")) { + if (streq(e, "dumb")) { sd_daemon = false; use_colors = false; break; @@ -432,10 +432,10 @@ cfg_init(int argc, char **argv) } case 'd': - if (!strcasecmp(optarg, "all")) { + if (strcaseeq(optarg, "all")) { debug_mask = ~0; break; - } else if (!strcasecmp(optarg, "list")) { + } else if (strcaseeq(optarg, "list")) { error("Debug categories:"); error(" * all"); for (i = 0; debug_category_str[i].name; i++) @@ -444,7 +444,7 @@ cfg_init(int argc, char **argv) } for (i = 0; debug_category_str[i].name; i++) { - if (!strcasecmp(optarg, debug_category_str[i].name)) + if (strcaseeq(optarg, debug_category_str[i].name)) break; } |