mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-06 09:08:28 +02:00
malloc + memset -> zalloc
And for clients using the xmalloc helper, use xzalloc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
c1bb30da2f
commit
420fbad8bb
1 changed files with 1 additions and 2 deletions
|
|
@ -552,10 +552,9 @@ evdev_device_create(struct weston_seat *seat, const char *path, int device_fd)
|
||||||
struct weston_compositor *ec;
|
struct weston_compositor *ec;
|
||||||
char devname[256] = "unknown";
|
char devname[256] = "unknown";
|
||||||
|
|
||||||
device = malloc(sizeof *device);
|
device = zalloc(sizeof *device);
|
||||||
if (device == NULL)
|
if (device == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
memset(device, 0, sizeof *device);
|
|
||||||
|
|
||||||
ec = seat->compositor;
|
ec = seat->compositor;
|
||||||
device->output =
|
device->output =
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue