fs: btrfs: initialize @ret to 0 to prevent uninitialized return value
In show_dir() if we hit a ROOT_ITEM, we can exit with uninitialized @ret. Fix it by initializing it to 0. Reported-by: Coverity CID 312955 Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Marek Behún <marek.behun@nic.cz>
This commit is contained in:
parent
9b5546c37a
commit
4891c4e595
@ -36,7 +36,7 @@ static int show_dir(struct btrfs_root *root, struct extent_buffer *eb,
|
||||
char *target = NULL;
|
||||
char filetime[32];
|
||||
time_t mtime;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
btrfs_dir_item_key_to_cpu(eb, di, &key);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user