summaryrefslogtreecommitdiff
path: root/src/clipboard.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 /src/clipboard.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 'src/clipboard.c')
-rw-r--r--src/clipboard.c3
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;