X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fudev%2Fudev-rules.c;h=7a4fb70258c582aa0d40fe64bc37da2e901fc3e4;hb=31afa0a44c2d7f93d837c840cdbd623982ac165f;hp=a86f8c365a958db2708a2e9017d9fd27a4f1eeb6;hpb=7850b3b83791ba0e2377ba40383c5abc258b839d;p=elogind.git diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index a86f8c365..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 */ @@ -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 {