diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2015-04-28 13:25:24 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2015-05-28 15:40:16 +0100 |
commit | 128344c2cf22385dedece5a3d774d3a24527d2de (patch) | |
tree | 6dca103101b4833145dce656f4de3cf08c0ab58f /tests/modetest/buffers.c | |
parent | c78917ee4fe6c787a5de9aaccc5319fdffc9a354 (diff) |
modetest: replace malloc + memset with calloc
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tests/modetest/buffers.c')
-rw-r--r-- | tests/modetest/buffers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c index 7e214e85..0b09cfc3 100644 --- a/tests/modetest/buffers.c +++ b/tests/modetest/buffers.c @@ -1022,7 +1022,7 @@ bo_create_dumb(int fd, unsigned int width, unsigned int height, unsigned int bpp struct bo *bo; int ret; - bo = malloc(sizeof(*bo)); + bo = calloc(1, sizeof(*bo)); if (bo == NULL) { fprintf(stderr, "failed to allocate buffer object\n"); return NULL; |