Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
if (fool_context[idx].codebuf)
free(fool_context[idx].codebuf);
- memset(&fool_context[idx], sizeof(struct _fool_context), 0);
+ memset(&fool_context[idx], 0, sizeof(struct _fool_context));
return 0;
}
if (trace_context[idx].trace_fp_surface && (trace_context[idx].trace_fp_surface != stderr))
fclose(trace_context[idx].trace_fp_surface);
- memset(&trace_context[idx], sizeof(struct _trace_context), 0);
+ memset(&trace_context[idx], 0, sizeof(struct _trace_context));
}