aboutsummaryrefslogtreecommitdiff
path: root/libio/iofopncook.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iofopncook.c')
-rw-r--r--libio/iofopncook.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libio/iofopncook.c b/libio/iofopncook.c
index c016cfb..52e025b 100644
--- a/libio/iofopncook.c
+++ b/libio/iofopncook.c
@@ -76,7 +76,8 @@ _IO_cookie_seek (fp, offset, dir)
return ((cfile->__io_functions.seek == NULL
|| (cfile->__io_functions.seek (cfile->__cookie, &offset, dir)
- == (_IO_off64_t) -1))
+ == -1)
+ || offset == (_IO_off64_t) -1)
? _IO_pos_BAD : offset);
}