summaryrefslogtreecommitdiff
path: root/cmds-inspect.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2013-01-24 18:18:51 -0600
committerZach Brown <zab@redhat.com>2013-02-05 16:09:41 -0800
commit8efd6e674648fd905822729e753b0a4587ca63f5 (patch)
tree82fa989eca8f6783e8818b23277838a0ddaabee8 /cmds-inspect.c
parenta2eec48a8e863e34715cb111b5f578e58d728b7c (diff)
downloadbtrfs-progs-8efd6e674648fd905822729e753b0a4587ca63f5.tar.gz
btrfs-progs: zero out inspect ioctl args
Mostly just to keep things like coverity happy about potentially uninitialized structure members, since it doesn't grok the ioctl. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Zach Brown <zab@redhat.com>
Diffstat (limited to 'cmds-inspect.c')
-rw-r--r--cmds-inspect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmds-inspect.c b/cmds-inspect.c
index e02b53a..ff6d00f 100644
--- a/cmds-inspect.c
+++ b/cmds-inspect.c
@@ -44,6 +44,7 @@ static int __ino_to_path_fd(u64 inum, int fd, int verbose, const char *prepend)
if (!fspath)
return 1;
+ memset(fspath, 0, sizeof(*fspath));
ipa.inum = inum;
ipa.size = 4096;
ipa.fspath = (uintptr_t)fspath;
@@ -172,6 +173,7 @@ static int cmd_logical_resolve(int argc, char **argv)
if (!inodes)
return 1;
+ memset(inodes, 0, sizeof(*inodes));
loi.logical = atoll(argv[optind]);
loi.size = size;
loi.inodes = (uintptr_t)inodes;