]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: use strempty() where appropriate 12188/head
authorLennart Poettering <lennart@poettering.net>
Tue, 2 Apr 2019 12:53:05 +0000 (14:53 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 2 Apr 2019 12:54:42 +0000 (14:54 +0200)
src/udev/udev-rules.c

index c5d6feee7e1cdea199979ba21994f2b4847932c3..ee87d7c65c72b3244325c1b131a2176f118eb43c 100644 (file)
@@ -1645,8 +1645,7 @@ static bool match_key(UdevRules *rules, struct token *token, const char *val) {
         char *pos;
         bool match = false;
 
-        if (!val)
-                val = "";
+        val = strempty(val);
 
         switch (token->key.glob) {
         case GL_PLAIN: