udev_device.c: decrement size by 1
SUBSYSTEM == 9, not 10. same for others
This commit is contained in:
+3
-3
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user