mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 02:20:30 +01:00
util: use already computed strlen
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1252>
This commit is contained in:
parent
cc3f0c783a
commit
0c2fd88580
1 changed files with 1 additions and 1 deletions
|
|
@ -525,7 +525,7 @@ strstartswith(const char *str, const char *prefix)
|
|||
|
||||
size_t prefixlen = strlen(prefix);
|
||||
|
||||
return prefixlen > 0 ? strneq(str, prefix, strlen(prefix)) : false;
|
||||
return prefixlen > 0 ? strneq(str, prefix, prefixlen) : false;
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue