mirror of
https://github.com/systemd/systemd
synced 2024-10-15 04:24:19 +00:00
udev: use startswith() instead of the combination of strneq() and strlen() (#8459)
This commit is contained in:
parent
8eebb6a9e5
commit
0caa99466d
|
@ -259,9 +259,8 @@ static int get_file_options(struct udev *udev,
|
|||
if (vendor_in == NULL)
|
||||
break;
|
||||
} else if (vendor_in &&
|
||||
strneq(vendor, vendor_in, strlen(vendor_in)) &&
|
||||
(!model_in ||
|
||||
(strneq(model, model_in, strlen(model_in))))) {
|
||||
startswith(vendor, vendor_in) &&
|
||||
(!model_in || startswith(model, model_in))) {
|
||||
/*
|
||||
* Matched vendor and optionally model.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue