Changeset 1fd36613 in rtems for c/src/lib/libc/imfs_directory.c


Ignore:
Timestamp:
Nov 8, 2001, 12:31:44 AM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
21766bd6
Parents:
a637c08
Message:

2001-11-07 Jennifer Averett <jennifer@…>

Reported by Ibragimov Ilya <ibr@…> and tracked as PR49.

  • src/imfs/imfs_directory.c: Do not calculate the offset twice.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libc/imfs_directory.c

    ra637c08 r1fd36613  
    176176)
    177177{
    178   off_t normal_offset;
    179 
    180   normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
    181 
    182 
    183178  switch( whence )
    184179  {
    185180     case SEEK_SET:     /* absolute move from the start of the file */
    186         iop->offset = normal_offset;
    187         break;
    188 
    189181     case SEEK_CUR:     /* relative move */
    190         iop->offset = iop->offset + normal_offset;
     182        iop->offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
    191183        break;
    192184
Note: See TracChangeset for help on using the changeset viewer.