mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
Simplify offset underflow checks even more
This commit is contained in:
parent
4fd606bfba
commit
c4b2cc78e3
1 changed files with 2 additions and 12 deletions
|
|
@ -114,8 +114,8 @@ get_real_pos:
|
|||
* those from ungetc) cause the position to be
|
||||
* smaller than that in the underlying object.
|
||||
*/
|
||||
pos -= fp->_r;
|
||||
if (pos < 0) {
|
||||
if ((pos -= fp->_r) < 0 ||
|
||||
(HASUB(fp) && (pos -= fp->_ur) < 0)) {
|
||||
fp->_p = fp->_bf._base;
|
||||
fp->_r = 0;
|
||||
if (HASUB(fp))
|
||||
|
|
@ -123,16 +123,6 @@ get_real_pos:
|
|||
if (spos == -1)
|
||||
goto get_real_pos;
|
||||
pos = spos;
|
||||
} else if (HASUB(fp)) {
|
||||
pos -= fp->_ur;
|
||||
if (pos < 0) {
|
||||
fp->_p = fp->_bf._base;
|
||||
fp->_r = 0;
|
||||
FREEUB(fp);
|
||||
if (spos == -1)
|
||||
goto get_real_pos;
|
||||
pos = spos;
|
||||
}
|
||||
}
|
||||
} else if ((fp->_flags & __SWR) && fp->_p != NULL) {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue