mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-26 13:07:55 +00:00
Btrfs-progs: make smatch checker happy (trivial fixes)
It complains errno never gets assigned to zero in find-root and since errno anyway is zero at program started up, lets remove it. Check "copy is less then zero" isn't possible because strtoull used by arg_strtou64 wouldn't return -ve number. Trivial space fixes. Signed-off-by: Rakesh Pandit <rakesh@tuxera.com> Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
6ca8f9cfc2
commit
ad17d56084
@ -287,7 +287,6 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
while ((opt = getopt(argc, argv, "l:o:g:")) != -1) {
|
while ((opt = getopt(argc, argv, "l:o:g:")) != -1) {
|
||||||
switch(opt) {
|
switch(opt) {
|
||||||
errno = 0;
|
|
||||||
case 'o':
|
case 'o':
|
||||||
search_objectid = arg_strtou64(optarg);
|
search_objectid = arg_strtou64(optarg);
|
||||||
break;
|
break;
|
||||||
|
@ -153,8 +153,6 @@ int main(int ac, char **av)
|
|||||||
print_usage();
|
print_usage();
|
||||||
if (logical == 0)
|
if (logical == 0)
|
||||||
print_usage();
|
print_usage();
|
||||||
if (copy < 0)
|
|
||||||
print_usage();
|
|
||||||
|
|
||||||
dev = av[optind];
|
dev = av[optind];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user