mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-06 03:28:00 +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
71d66e22e5
commit
3cb516930f
1 changed files with 1 additions and 2 deletions
|
|
@ -338,11 +338,10 @@ udev_seat_create(struct weston_compositor *c, const char *seat_name)
|
|||
{
|
||||
struct udev_seat *seat;
|
||||
|
||||
seat = malloc(sizeof *seat);
|
||||
seat = zalloc(sizeof *seat);
|
||||
|
||||
if (!seat)
|
||||
return NULL;
|
||||
memset(seat, 0, sizeof *seat);
|
||||
weston_seat_init(&seat->base, c, seat_name);
|
||||
seat->base.led_update = drm_led_update;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue