chiark / gitweb /
udev: handle network controllers in nonstandard domains
[elogind.git] / src / udev / udev-rules.c
index a86f8c365a958db2708a2e9017d9fd27a4f1eeb6..7a4fb70258c582aa0d40fe64bc37da2e901fc3e4 100644 (file)
@@ -55,7 +55,7 @@ struct udev_rules {
         unsigned int token_cur;
         unsigned int token_max;
 
-        /* all key strings are copied and de-duplicated in a single continous string buffer */
+        /* all key strings are copied and de-duplicated in a single continuous string buffer */
         struct strbuf *strbuf;
 
         /* during rule parsing, uid/gid lookup results are cached */
@@ -1737,7 +1737,7 @@ static int match_key(struct udev_rules *rules, struct token *token, const char *
                                 if (next != NULL) {
                                         size_t matchlen = (size_t)(next - s);
 
-                                        match = (matchlen == len && strncmp(s, val, matchlen) == 0);
+                                        match = (matchlen == len && strneq(s, val, matchlen));
                                         if (match)
                                                 break;
                                 } else {