diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-08-08 11:57:05 +1000 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-08-08 13:46:13 -0700 |
commit | f3d62276d20750e636fc82bc89b3c4c23576299d (patch) | |
tree | 05fee3d04531b3e3b303d82a546e26c1f1d96d81 /clients/keyboard.c | |
parent | b1bc4a68b0bc2d7b391c7484a52a46a636ad89fc (diff) | |
download | weston-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.c | 4 |
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); |