aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2016-05-27 17:42:59 +0000
committerEnji Cooper <ngie@FreeBSD.org>2016-05-27 17:42:59 +0000
commit613fbf2c24ca730d26a5ea636495e778fb9ed525 (patch)
tree57d8b528782ac1e2ef87e6ee2af6f4725f26d1cd /tools
parent99819ca00cb3f5377353364a78bff362b0c562a3 (diff)
downloadsrc-613fbf2c24ca730d26a5ea636495e778fb9ed525.tar.gz
src-613fbf2c24ca730d26a5ea636495e778fb9ed525.zip
Initialize `t` with memset(.., 0, ..)
This will help ensure that we're not using random garbage on the stack by accident with respect to the variable MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=300856
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/ioat/ioatcontrol.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/tools/ioat/ioatcontrol.c b/tools/tools/ioat/ioatcontrol.c
index 32decc77a2f7..32890f8d0b2d 100644
--- a/tools/tools/ioat/ioatcontrol.c
+++ b/tools/tools/ioat/ioatcontrol.c
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
+#include <string.h>
#include <sysexits.h>
#include <unistd.h>
@@ -104,6 +105,8 @@ main(int argc, char **argv)
bool fflag, rflag, Eflag, mflag;
unsigned modeflags;
+ memset(&t, 0, sizeof(t));
+
fflag = rflag = Eflag = mflag = false;
modeflags = 0;