Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use correct struct udev_device pointer #5

Merged
merged 1 commit into from
Jun 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1314,12 +1314,13 @@ static int input_device_add(struct udev_device *udev_device)
"/dev/misc/uinput",
NULL
};
const char* name;
const char* name = NULL;
const char* path;
const char* enable;
const char* evmap_file;
const char* remote;
struct input_device *device;
struct udev_device *parent;
unsigned long bit[BITFIELD_LONGS_PER_ARRAY(EV_MAX)];
unsigned long bit_key[BITFIELD_LONGS_PER_ARRAY(KEY_MAX)];
unsigned long bit_rel[BITFIELD_LONGS_PER_ARRAY(REL_MAX)];
Expand All @@ -1344,9 +1345,9 @@ static int input_device_add(struct udev_device *udev_device)
return -1;
}

name = udev_device_get_parent(udev_device);
if (name)
name = udev_device_get_property_value(name, "NAME");
parent = udev_device_get_parent(udev_device);
if (parent)
name = udev_device_get_property_value(parent, "NAME");
if ((name != NULL) && (strncmp(name, "\"eventlircd\"", strlen("\"eventlircd\"")) == 0)) {
return 0;
}
Expand Down