summaryrefslogtreecommitdiff
path: root/src/modules/rtv
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-05-25 13:15:00 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-05-25 13:15:00 -0700
commit9b6136a732114949be57d42ce358f7b3cc2f5bbf (patch)
tree151634aa9577dc9838ac7516dfa8e54b91c2be68 /src/modules/rtv
parent3e3faa57e22610fa03050089b0e15c9df7fe832e (diff)
*: normalize on all case-insensitive comparisons
I don't think rototiller is an appropriate place for being so uncooperative, if someone gets the case wrong anywhere just make it work. We should avoid making different things so subtly different that case alone is the distinction anyways, so I don't see this creating any future namespace collision problems.
Diffstat (limited to 'src/modules/rtv')
-rw-r--r--src/modules/rtv/rtv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c
index 3e789ab..d60a4cd 100644
--- a/src/modules/rtv/rtv.c
+++ b/src/modules/rtv/rtv.c
@@ -195,7 +195,7 @@ static void setup_next_channel(rtv_context_t *ctxt, unsigned ticks)
static int rtv_should_skip_module(const rtv_setup_t *setup, const til_module_t *module)
{
if (module == &rtv_module ||
- (setup->snow_module && !strcmp(module->name, setup->snow_module)))
+ (setup->snow_module && !strcasecmp(module->name, setup->snow_module)))
return 1;
/* An empty channels list is a special case for representing "all", an
@@ -205,7 +205,7 @@ static int rtv_should_skip_module(const rtv_setup_t *setup, const til_module_t *
return 0;
for (char * const *channel = setup->channels; *channel; channel++) {
- if (!strcmp(module->name, *channel))
+ if (!strcasecmp(module->name, *channel))
return 0;
}
@@ -404,7 +404,7 @@ static int rtv_setup(const til_settings_t *settings, til_setting_t **res_setting
return -ENOMEM;
/* turn channels colon-separated list into a null-terminated array of strings */
- if (strcmp(channels, "all")) {
+ if (strcasecmp(channels, "all")) {
const til_module_t **modules;
size_t n_modules;
char *tokchannels, *channel;
@@ -425,7 +425,7 @@ static int rtv_setup(const til_settings_t *settings, til_setting_t **res_setting
size_t i;
for (i = 0; i < n_modules; i++) {
- if (!strcmp(channel, modules[i]->name))
+ if (!strcasecmp(channel, modules[i]->name))
break;
}
@@ -450,7 +450,7 @@ static int rtv_setup(const til_settings_t *settings, til_setting_t **res_setting
} while ((channel = strtok(NULL, ":")));
}
- if (strcmp(snow_module, "none"))
+ if (strcasecmp(snow_module, "none"))
setup->snow_module = strdup(snow_module);
/* TODO FIXME: parse errors */
© All Rights Reserved