mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 09:20:29 +01: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;
|
||||
char devname[256] = "unknown";
|
||||
|
||||
device = malloc(sizeof *device);
|
||||
device = zalloc(sizeof *device);
|
||||
if (device == NULL)
|
||||
return NULL;
|
||||
memset(device, 0, sizeof *device);
|
||||
|
||||
ec = seat->compositor;
|
||||
device->output =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue