fix obvious errors

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18745 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2006-09-05 09:29:44 +00:00
parent 6738c5a127
commit 0e195cc633
@@ -379,8 +379,7 @@ check_common_volume_descriptor(iso9660_common_volume_descriptor *common)
status_t status_t
iso9660_fs_identify(int deviceFD, iso9660_info *info) iso9660_fs_identify(int deviceFD, iso9660_info *info)
{ {
bool result = false; char buffer[ISO_PVD_SIZE];
uchar *buffer = NULL;
bool exit = false; bool exit = false;
status_t error = B_OK; status_t error = B_OK;
nspace *vol; nspace *vol;
@@ -402,7 +401,7 @@ iso9660_fs_identify(int deviceFD, iso9660_info *info)
iso9660_common_volume_descriptor *common = NULL; iso9660_common_volume_descriptor *common = NULL;
// Read the block containing the current descriptor // Read the block containing the current descriptor
error = read_pos (vol->fdOfSession, offset, (void *)&buffer, ISO_PVD_SIZE); error = read_pos (vol->fd, offset, (void *)&buffer, ISO_PVD_SIZE);
offset += ISO_PVD_SIZE; offset += ISO_PVD_SIZE;
if (error < ISO_PVD_SIZE) { if (error < ISO_PVD_SIZE) {
break; break;
@@ -516,10 +515,6 @@ iso9660_fs_identify(int deviceFD, iso9660_info *info)
break; break;
} }
} }
if (buffer) {
free(buffer);
buffer = NULL;
}
} }
free(vol); free(vol);