mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-25 01:10:09 +01:00
util: use already computed strlen
Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/342>
This commit is contained in:
parent
edc8ea045a
commit
1b11d10ff2
1 changed files with 1 additions and 1 deletions
|
|
@ -411,7 +411,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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue