mirror of
https://github.com/moparisthebest/uinput-mapper
synced 2025-02-16 15:00:10 -05:00
Put memset because min/max set.
This commit is contained in:
parent
1041fc793c
commit
256ef5c8bb
5
map.c
5
map.c
@ -102,6 +102,10 @@ int main(int argc, char** argv) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Memset because we are already setting the absmax/absmin */
|
||||||
|
memset(&uidev, '\0', sizeof(struct uinput_user_dev));
|
||||||
|
|
||||||
for(j = 0; j < 2; j++) {
|
for(j = 0; j < 2; j++) {
|
||||||
js[j] = open(UINPUT_PATH, O_WRONLY | O_NONBLOCK);
|
js[j] = open(UINPUT_PATH, O_WRONLY | O_NONBLOCK);
|
||||||
if (js[j] < 0) {
|
if (js[j] < 0) {
|
||||||
@ -143,7 +147,6 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
|
|
||||||
/* Allocate device info */
|
/* Allocate device info */
|
||||||
memset(&uidev, '\0', sizeof(struct uinput_user_dev));
|
|
||||||
snprintf(uidev.name, UINPUT_MAX_NAME_SIZE, "key2joy:1");
|
snprintf(uidev.name, UINPUT_MAX_NAME_SIZE, "key2joy:1");
|
||||||
|
|
||||||
uidev.id.bustype = BUS_USB;
|
uidev.id.bustype = BUS_USB;
|
||||||
|
Loading…
Reference in New Issue
Block a user