summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/stdio/ftell.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index a124ff615..9fa971029 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,5 +1,10 @@
2005-01-06 Hans-Peter Nilsson <hp@axis.com>
+ * libc/stdio/ftell.c (ftell_r): Add parenthesis for __SWR
+ bit-test in combination with NULL test.
+
+2005-01-06 Hans-Peter Nilsson <hp@axis.com>
+
* README: Fix typo of LGPL. Change "license" to "copyright".
2004-12-17 Jeff Johnston <jjohnstn@redhat.com>
diff --git a/newlib/libc/stdio/ftell.c b/newlib/libc/stdio/ftell.c
index 952574159..b273c8bc9 100644
--- a/newlib/libc/stdio/ftell.c
+++ b/newlib/libc/stdio/ftell.c
@@ -143,7 +143,7 @@ _DEFUN(_ftell_r, (ptr, fp),
if (HASUB (fp))
pos -= fp->_ur;
}
- else if (fp->_flags & __SWR && fp->_p != NULL)
+ else if ((fp->_flags & __SWR) && fp->_p != NULL)
{
/*
* Writing. Any buffered characters cause the