summaryrefslogtreecommitdiff
path: root/clients/keyboard.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-08-08 11:57:05 +1000
committerKristian Høgsberg <krh@bitplanet.net>2013-08-08 13:46:13 -0700
commitf3d62276d20750e636fc82bc89b3c4c23576299d (patch)
tree05fee3d04531b3e3b303d82a546e26c1f1d96d81 /clients/keyboard.c
parentb1bc4a68b0bc2d7b391c7484a52a46a636ad89fc (diff)
downloadweston-f3d62276d20750e636fc82bc89b3c4c23576299d.tar.gz
malloc + memset -> zalloc
And for clients using the xmalloc helper, use xzalloc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'clients/keyboard.c')
-rw-r--r--clients/keyboard.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/clients/keyboard.c b/clients/keyboard.c
index 5fe5d9d5..9c5cbc5a 100644
--- a/clients/keyboard.c
+++ b/clients/keyboard.c
@@ -836,9 +836,7 @@ keyboard_create(struct output *output, struct virtual_keyboard *virtual_keyboard
layout = get_current_layout(virtual_keyboard);
- keyboard = xmalloc(sizeof *keyboard);
- memset(keyboard, 0, sizeof *keyboard);
-
+ keyboard = xzalloc(sizeof *keyboard);
keyboard->keyboard = virtual_keyboard;
keyboard->window = window_create_custom(virtual_keyboard->display);
keyboard->widget = window_add_widget(keyboard->window, keyboard);