2001-11-07 Jennifer Averett <jennifer@OARcorp.com>

Reported by Ibragimov Ilya <ibr@oktet.ru> and tracked as PR49.
	*  src/imfs/imfs_directory.c: Do not calculate the offset twice.
This commit is contained in:
Joel Sherrill
2001-11-08 00:24:55 +00:00
parent f2278a8585
commit 47901d84b3
6 changed files with 21 additions and 30 deletions

View File

@@ -1,3 +1,8 @@
2001-11-07 Jennifer Averett <jennifer@OARcorp.com>
Reported by Ibragimov Ilya <ibr@oktet.ru> and tracked as PR49.
* src/imfs/imfs_directory.c: Do not calculate the offset twice.
2001-10-26 Victor V. Vengerov <vvv@oktet.ru>
* src/imfs/imfs_load_tar.c: Minor modification so this will

View File

@@ -187,18 +187,11 @@ int imfs_dir_lseek(
int whence
)
{
off_t normal_offset;
normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
switch( whence ) {
case SEEK_SET: /* absolute move from the start of the file */
iop->offset = normal_offset;
break;
case SEEK_CUR: /* relative move */
iop->offset = iop->offset + normal_offset;
iop->offset = (iop->offset/sizeof(struct dirent)) *
sizeof(struct dirent);
break;
case SEEK_END: /* Movement past the end of the directory via lseek */
@@ -206,7 +199,6 @@ int imfs_dir_lseek(
default:
set_errno_and_return_minus_one( EINVAL );
break;
}
return 0;