X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fudev%2Fudev-rules.c;h=7a4fb70258c582aa0d40fe64bc37da2e901fc3e4;hb=f3dbb13c8535882be9de14d1cf2b0656c96c89bb;hp=bb57d2af4809a5d40e89da01b5d450ab35230a5d;hpb=d5a89d7dc17a5ba5cf4fc71f82963c5c94a31c3d;p=elogind.git diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index bb57d2af4..7a4fb7025 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -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 */ @@ -1619,7 +1619,7 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) return udev_rules_unref(rules); udev_rules_check_timestamp(rules); - r = conf_files_list_strv(&files, ".rules", (const char **)rules->dirs); + r = conf_files_list_strv(&files, ".rules", NULL, (const char **)rules->dirs); if (r < 0) { log_error("failed to enumerate rules files: %s\n", strerror(-r)); return udev_rules_unref(rules); @@ -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 {