Microoptimize.
This commit is contained in:
parent
4fe4a788af
commit
190d73a757
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=290232
@ -118,15 +118,14 @@ _ftello(FILE *fp, fpos_t *offset)
|
||||
}
|
||||
if (HASUB(fp))
|
||||
pos -= fp->_r; /* Can be negative at this point. */
|
||||
} else if ((fp->_flags & __SWR) && fp->_p != NULL) {
|
||||
} else if ((fp->_flags & __SWR) && fp->_p != NULL &&
|
||||
(n = fp->_p - fp->_bf._base) > 0) {
|
||||
/*
|
||||
* Writing. Any buffered characters cause the
|
||||
* position to be greater than that in the
|
||||
* underlying object.
|
||||
*/
|
||||
n = fp->_p - fp->_bf._base;
|
||||
if (n > 0 &&
|
||||
((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP))) {
|
||||
if ((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP)) {
|
||||
int serrno = errno;
|
||||
|
||||
errno = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user