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 /src/clipboard.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 'src/clipboard.c')
-rw-r--r-- | src/clipboard.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/clipboard.c b/src/clipboard.c index 54f06e61..5a3a02d2 100644 --- a/src/clipboard.c +++ b/src/clipboard.c @@ -283,10 +283,9 @@ clipboard_create(struct weston_seat *seat) { struct clipboard *clipboard; - clipboard = malloc(sizeof *clipboard); + clipboard = zalloc(sizeof *clipboard); if (clipboard == NULL) return NULL; - memset(clipboard, 0, sizeof *clipboard); clipboard->seat = seat; clipboard->selection_listener.notify = clipboard_set_selection; |