chiark / gitweb /
use strneq instead of strncmp
[elogind.git] / src / udev / udev-rules.c
index a86f8c365a958db2708a2e9017d9fd27a4f1eeb6..d2810a01d82ecf7140a8e519cde588ce4fd210c5 100644 (file)
@@ -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 {