goto dumb; if can't obtain curoff for whence != SEEK_CUR cases, as supposed

This commit is contained in:
Andrey A. Chernov 2001-08-30 20:19:45 +00:00
parent e54bc118c1
commit 77f71bc5ac

View File

@ -256,17 +256,13 @@ _fseeko(fp, offset, whence, ltest)
fp->_p -= curoff;
fp->_r += curoff;
curoff = 0;
} else {
errno = EBADF;
return (-1);
}
} else
goto dumb;
}
if (HASUB(fp)) {
curoff -= fp->_ur;
if (curoff < 0) {
errno = EBADF;
return (-1);
}
if (curoff < 0)
goto dumb;
}
}