From 57f6950eb919066348d26f73652901c48f5876d8 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 13 Nov 2023 16:20:09 +0100 Subject: [PATCH] udev-rules: use udev_get_property_value() --- src/udev/udev-rules.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index abb44e99241..d30c2f923e9 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -1981,10 +1981,9 @@ static int udev_rule_apply_token_to_event( case TK_M_NAME: return token_match_string(token, event->name); case TK_M_ENV: { - const char *val; + const char *val = NULL; - if (sd_device_get_property_value(dev, token->data, &val) < 0) - val = hashmap_get(properties_list, token->data); + (void) device_get_property_value_with_fallback(dev, token->data, properties_list, &val); return token_match_string(token, val); } -- 2.47.3