mirror of
https://git.freebsd.org/ports.git
synced 2025-06-10 07:10:32 -04:00
Tools and bindings for kernel input event device emulation and data capture and replay. Evemu provides a programmatic API to access the kernel input event devices. The original and intended purpose is for supporting multi-touch input, especially with regard to the Ubuntu touch and gesture stack. WWW: http://www.freedesktop.org/wiki/Evemu PR: 218383 Approved by: bapt (mentor)
21 lines
609 B
C
21 lines
609 B
C
--- src/evemu.c.orig 2016-11-08 09:43:24 UTC
|
|
+++ src/evemu.c
|
|
@@ -456,16 +456,13 @@ int evemu_write(const struct evemu_devic
|
|
static int parse_name(struct evemu_device *dev, const char *line)
|
|
{
|
|
int matched;
|
|
- char *devname = NULL;
|
|
+ char devname[UINPUT_MAX_NAME_SIZE];
|
|
|
|
- if ((matched = sscanf(line, "N: %m[^\n\r]\n", &devname)) > 0) {
|
|
+ if ((matched = sscanf(line, "N: %[^\n\r]\n", devname)) > 0) {
|
|
if (strlen(evemu_get_name(dev)) == 0)
|
|
evemu_set_name(dev, devname);
|
|
}
|
|
|
|
- if (devname != NULL)
|
|
- free(devname);
|
|
-
|
|
if (matched <= 0)
|
|
error(FATAL, "Expected device name, but got: %s", line);
|
|
|