klibc: fseek: use >= 0 to test for lseek() success
On Linux, at least, lseek() will never return a negative value on
success; on some architectures comparing against zero is smaller.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
diff --git a/usr/klibc/stdio/fseek.c b/usr/klibc/stdio/fseek.c
index fe6aeab..e35f85e 100644
--- a/usr/klibc/stdio/fseek.c
+++ b/usr/klibc/stdio/fseek.c
@@ -17,7 +17,7 @@
where -= f->ibytes;
rv = lseek(f->pub._IO_fileno, where, whence);
- if (__likely(rv != (off_t)-1)) {
+ if (__likely(rv >= 0)) {
f->pub._IO_eof = false;
f->ibytes = 0;
return 0;