diff options
author | Nicolai Hähnle <nhaehnle@gmail.com> | 2009-10-03 13:43:42 +0200 |
---|---|---|
committer | Nicolai Hähnle <nhaehnle@gmail.com> | 2009-10-03 13:46:10 +0200 |
commit | a5fb264257651d50afe84be7e20f91df41242aa8 (patch) | |
tree | c0d6438c71816d6ba42148e5f2e6692a601b0d48 /libdrm/radeon/radeon_bo_gem.c | |
parent | 04495eeec2f053be17a10cc82e646a1e23ed3830 (diff) |
libdrm_radeon: Zero-initialize structures to silence valgrind warnings
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Diffstat (limited to 'libdrm/radeon/radeon_bo_gem.c')
-rw-r--r-- | libdrm/radeon/radeon_bo_gem.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libdrm/radeon/radeon_bo_gem.c b/libdrm/radeon/radeon_bo_gem.c index 76d80e7e..d34f24cd 100644 --- a/libdrm/radeon/radeon_bo_gem.c +++ b/libdrm/radeon/radeon_bo_gem.c @@ -137,6 +137,9 @@ static struct radeon_bo *bo_unref(struct radeon_bo *bo) munmap(bo_gem->priv_ptr, bo->size); } + /* Zero out args to make valgrind happy */ + memset(&args, 0, sizeof(args)); + /* close object */ args.handle = bo->handle; ioctl(bo->bom->fd, DRM_IOCTL_GEM_CLOSE, &args); @@ -160,6 +163,9 @@ static int bo_map(struct radeon_bo *bo, int write) } bo->ptr = NULL; + + /* Zero out args to make valgrind happy */ + memset(&args, 0, sizeof(args)); args.handle = bo->handle; args.offset = 0; args.size = (uint64_t)bo->size; @@ -201,6 +207,8 @@ static int bo_wait(struct radeon_bo *bo) struct drm_radeon_gem_wait_idle args; int ret; + /* Zero out args to make valgrind happy */ + memset(&args, 0, sizeof(args)); args.handle = bo->handle; do { ret = drmCommandWriteRead(bo->bom->fd, DRM_RADEON_GEM_WAIT_IDLE, |