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:
parent
7ddc0f713f
commit
01bd94ac4f
1 changed files with 5 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue