From ae48dc3b3caeef7eaa4a079b11cdda988d9c1f0d Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Sun, 21 Jun 2020 00:06:29 +0200 Subject: Add streq and strcaseeq and use them throughout --- main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 0bd5bb0..ba9ea37 100644 --- a/main.c +++ b/main.c @@ -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; } -- cgit v1.2.3