aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/fseek.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/fseek.c')
-rw-r--r--newlib/libc/stdio/fseek.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/newlib/libc/stdio/fseek.c b/newlib/libc/stdio/fseek.c
index b3df7f0..2ad9855 100644
--- a/newlib/libc/stdio/fseek.c
+++ b/newlib/libc/stdio/fseek.c
@@ -129,11 +129,11 @@ _DEFUN(_fseek_r, (ptr, fp, offset, whence),
struct stat st;
int havepos;
- _flockfile (fp);
-
/* Make sure stdio is set up. */
- CHECK_INIT (fp);
+ CHECK_INIT (ptr);
+
+ _flockfile (fp);
/* If we've been doing some writing, and we're in append mode
then we don't really know where the filepos is. */