diff options
author | ngie <ngie@FreeBSD.org> | 2016-05-27 17:42:59 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-05-27 17:42:59 +0000 |
commit | 1e901d9ba63e1abb5aee957bd318a1058e870479 (patch) | |
tree | 57d8b528782ac1e2ef87e6ee2af6f4725f26d1cd /tools | |
parent | 40ca24f26f62e2137200193a5b04cd195ca1bb68 (diff) | |
download | FreeBSD-src-1e901d9ba63e1abb5aee957bd318a1058e870479.zip FreeBSD-src-1e901d9ba63e1abb5aee957bd318a1058e870479.tar.gz |
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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/ioat/ioatcontrol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/tools/ioat/ioatcontrol.c b/tools/tools/ioat/ioatcontrol.c index 32decc7..32890f8 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; |