mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-21 07:15:49 +00:00
f144058b40
1. Subtraction was performed on the current position regardless of the success of the lseek operation. In the event of an error, this resulted in the current position being erroneously set to -2, which bypassed the intended error handling mechanism. The proposed change performs error checking immediately following the lseek operation, prior to any modification of the current position. This ensures that a failed lseek operation will correctly trigger the appropriate error handling. 2. The error checking logic was based on the assumption that lseek would return `offset - 1` upon failure. However, this is not consistent with the behaviour of lseek as specified in the POSIX standard, which stipulates that lseek shall return -1 in case of an error. The code has been updated to reflect this standard, improving reliability and compliance. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1392 |
||
---|---|---|
.. | ||
figpar.3 | ||
figpar.c | ||
figpar.h | ||
Makefile | ||
Makefile.depend | ||
string_m.c | ||
string_m.h |