You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
1.0 KiB

From c7669d8eecd831e278bee8f5ee591d5b6577a445 Mon Sep 17 00:00:00 2001
From: illiliti <illiliti@protonmail.com>
Date: Sun, 5 Sep 2021 17:22:32 +0300
Subject: [PATCH 02/15] udev_enumerate.c: fix endless loop in filter_property
---
udev_enumerate.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
--- a/udev_enumerate.c
+++ b/udev_enumerate.c
@@ -175,13 +175,11 @@ static int filter_property(struct udev_e
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);