mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-24 15:12:47 +00:00
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>
This commit is contained in:
parent
a2eec48a8e
commit
8efd6e6746
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user