mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-25 15:42:23 +00:00
btrfs-progs: inspect: set return value of error case
In case of open_file_or_dir() failed, ret is not set to right value, and the function will return unwanted value(ret of sprintf). Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
97a9818716
commit
b570afae4d
@ -243,6 +243,7 @@ static int cmd_inspect_logical_resolve(int argc, char **argv)
|
||||
if (path_fd < 0) {
|
||||
fprintf(stderr, "ERROR: can't access "
|
||||
"'%s'\n", full_path);
|
||||
ret = -ENOENT;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user