Initialize _offset to 0 in fopen(), it helps to optimize fseek/ftell
This commit is contained in:
parent
6633ea2c9b
commit
a0ba17755e
@ -69,6 +69,8 @@ fopen(file, mode)
|
||||
}
|
||||
fp->_file = f;
|
||||
fp->_flags = flags;
|
||||
fp->_flags |= __SOFF;
|
||||
fp->_offset = 0;
|
||||
fp->_cookie = fp;
|
||||
fp->_read = __sread;
|
||||
fp->_write = __swrite;
|
||||
|
Loading…
Reference in New Issue
Block a user