Bluetooth: Shell: Remove tolower from is_substring

The tolower is not necessary and is what strncasecmp
does anyhow.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2023-12-04 11:22:06 +01:00 committed by Carles Cufí
commit 01bd94ac4f

View file

@ -234,7 +234,6 @@ static bool is_substring(const char *substr, const char *str)
}
for (size_t pos = 0; pos < str_len; pos++) {
if (tolower(substr[pos]) == tolower(str[pos])) {
if (pos + sub_str_len > str_len) {
return false;
}
@ -243,7 +242,6 @@ static bool is_substring(const char *substr, const char *str)
return true;
}
}
}
return false;
}