udev_device.c: use strncmp to compare uevent vars
This commit is contained in:
parent
4623040b6c
commit
4cb97cd01e
1 changed files with 3 additions and 3 deletions
|
|
@ -672,9 +672,9 @@ struct udev_device *udev_device_new_from_file(struct udev *udev, const char *pat
|
|||
|
||||
*pos = '\0';
|
||||
|
||||
if (strcmp(line, "SUBSYSTEM") == 0 ||
|
||||
strcmp(line, "ACTION") == 0 ||
|
||||
strcmp(line, "SEQNUM") == 0) {
|
||||
if (strncmp(line, "SUBSYSTEM", 10) == 0 ||
|
||||
strncmp(line, "ACTION", 7) == 0 ||
|
||||
strncmp(line, "SEQNUM", 7) == 0) {
|
||||
cnt++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue