udev_enumerate.c: fix endless loop in filter_property
This commit is contained in:
parent
3c2593376a
commit
c7669d8eec
1 changed files with 5 additions and 7 deletions
|
|
@ -175,13 +175,11 @@ static int filter_property(struct udev_enumerate *udev_enumerate, struct udev_de
|
|||
property2 = udev_list_entry_get_name(list_entry2);
|
||||
value2 = udev_list_entry_get_value(list_entry2);
|
||||
|
||||
if (!value || !value2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (fnmatch(property, property2, 0) == 0 &&
|
||||
fnmatch(value, value2, 0) == 0) {
|
||||
return 1;
|
||||
if (value && value2) {
|
||||
if (fnmatch(property, property2, 0) == 0 &&
|
||||
fnmatch(value, value2, 0) == 0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
list_entry2 = udev_list_entry_get_next(list_entry2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue