From 034a3909ae2275e2a74ae8f33eb19673b18cdae8 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 6 Jan 2005 20:10:56 +0000 Subject: [PATCH] 2005-01-06 Hans-Peter Nilsson * libc/stdio/ftell.c (ftell_r): Add parenthesis for __SWR bit-test in combination with NULL test. --- newlib/ChangeLog | 5 +++++ newlib/libc/stdio/ftell.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index a124ff615..9fa971029 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2005-01-06 Hans-Peter Nilsson + + * libc/stdio/ftell.c (ftell_r): Add parenthesis for __SWR + bit-test in combination with NULL test. + 2005-01-06 Hans-Peter Nilsson * README: Fix typo of LGPL. Change "license" to "copyright". 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 -- 2.43.5