1
0
Fork 0

udev_device.c: decrement size by 1

SUBSYSTEM == 9, not 10. same for others
This commit is contained in:
illiliti 2021-06-03 12:06:18 +03:00
parent 4cb97cd01e
commit a81cb4444d

View file

@ -672,9 +672,9 @@ struct udev_device *udev_device_new_from_file(struct udev *udev, const char *pat
*pos = '\0';
if (strncmp(line, "SUBSYSTEM", 10) == 0 ||
strncmp(line, "ACTION", 7) == 0 ||
strncmp(line, "SEQNUM", 7) == 0) {
if (strncmp(line, "SUBSYSTEM", 9) == 0 ||
strncmp(line, "ACTION", 6) == 0 ||
strncmp(line, "SEQNUM", 6) == 0) {
cnt++;
}