Code cleanup: remove unused variable in src/ntfs_dir.c

Make fd variable more local in src/ntfs_udl.c
This commit is contained in:
Christophe Grenier 2009-04-14 12:24:59 +02:00
parent 33222ee2fc
commit a6c4be00b5
2 changed files with 2 additions and 7 deletions

View file

@ -408,12 +408,8 @@ static int ntfs_copy(disk_t *disk_car, const partition_t *partition, dir_data_t
static void dir_partition_ntfs_close(dir_data_t *dir_data)
{
const partition_t *partition;
disk_t *disk_car;
struct ntfs_dir_struct *ls=(struct ntfs_dir_struct*)dir_data->private_dir_data;
/* ntfs_umount() will invoke ntfs_device_free() for us. */
disk_car=ls->my_data->disk_car;
partition=ls->my_data->partition;
ntfs_umount(ls->vol, FALSE);
free(ls->my_data);
#ifdef HAVE_ICONV

View file

@ -838,7 +838,6 @@ static int undelete_file(ntfs_volume *vol, long long inode)
long long start, end;
runlist_element *rl;
struct td_list_head *item;
int fd = -1;
long long k;
int result = -2;
char *name;
@ -888,6 +887,7 @@ static int undelete_file(ntfs_volume *vol, long long inode)
//dir_data->local_dir;
create_pathname(opts.dest, file->pref_pname, name, d->name, pathname, sizeof(pathname));
if (d->resident) {
int fd;
fd = open_file(pathname);
if (fd < 0) {
log_error("Couldn't create file %s\n", pathname);
@ -904,8 +904,8 @@ static int undelete_file(ntfs_volume *vol, long long inode)
if (close(fd) < 0) {
log_error("Close failed\n");
}
fd = -1;
} else {
int fd;
rl = d->runlist;
if (!rl) {
log_verbose("File has no runlist, hence no data.\n");
@ -1030,7 +1030,6 @@ static int undelete_file(ntfs_volume *vol, long long inode)
if (close(fd) < 0) {
log_error("Close failed\n");
}
fd = -1;
}
set_date(pathname, file->date, file->date);