From 0c3fd8708fc54b4b46f5db20d34eb29508537b08 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 20 Nov 2013 08:32:14 -0800 Subject: [PATCH] intel: Use memset instead of VG_CLEAR The ioctl expects that certain fields will be zeroed, so we should allow the helper function to actually work in non-Valgrind builds. Signed-off-by: Ian Romanick Reported-by: Zhenyu Wang Reviewed-by: Damien Lespiau Reviewed-by: Daniel Vetter --- intel/intel_bufmgr_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index df6fcec..c11ed45 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -3033,7 +3033,7 @@ drm_intel_get_reset_stats(drm_intel_context *ctx, if (ctx == NULL) return -EINVAL; - VG_CLEAR(stats); + memset(&stats, 0, sizeof(stats)); bufmgr_gem = (drm_intel_bufmgr_gem *)ctx->bufmgr; stats.ctx_id = ctx->ctx_id; -- 2.7.4