Rename a single letter variable and move the defintion to the scope of
use.
Signed-off-by: David Sterba <dsterba@suse.com>
int i;
int recursive = 0;
int ret = 0;
int i;
int recursive = 0;
int ret = 0;
int compress_type = BTRFS_COMPRESS_NONE;
DIR *dirstream;
int compress_type = BTRFS_COMPRESS_NONE;
DIR *dirstream;
for (i = optind; i < argc; i++) {
struct stat st;
for (i = optind; i < argc; i++) {
struct stat st;
dirstream = NULL;
fd = open_file_or_dir(argv[i], &dirstream);
dirstream = NULL;
fd = open_file_or_dir(argv[i], &dirstream);
printf("%s\n", argv[i]);
ret = do_defrag(fd, defrag_global_fancy_ioctl,
&defrag_global_range);
printf("%s\n", argv[i]);
ret = do_defrag(fd, defrag_global_fancy_ioctl,
&defrag_global_range);
}
close_file_or_dir(fd, dirstream);
}
close_file_or_dir(fd, dirstream);
- if (ret && e == ENOTTY && defrag_global_fancy_ioctl) {
+ if (ret && defrag_err == ENOTTY && defrag_global_fancy_ioctl) {
error("defrag range ioctl not "
"supported in this kernel, please try "
"without any options.");
error("defrag range ioctl not "
"supported in this kernel, please try "
"without any options.");
- error("defrag failed on %s: %s", argv[i], strerror(e));
+ error("defrag failed on %s: %s", argv[i],
+ strerror(defrag_err));
defrag_global_errors++;
}
}
defrag_global_errors++;
}
}