libc/stdio/ftell.c (ftell_r): Add parenthesis
Hans-Peter Nilsson
hans-peter.nilsson@axis.com
Wed Jan 5 14:14:00 GMT 2005
Glaring at operator precedence, it seems it doesn't actually
matter, the parentheses just IMHO makes it a bit more readable.
That is, then you *don't* have to find that operator precedence
table and check. (I'm purging my local changes; this one's from
2000.)
2005-01-05 Hans-Peter Nilsson <hp@axis.com>
* libc/stdio/ftell.c (ftell_r): Add parenthesis for __SWR
bit-test in combination with NULL test.
Index: libc/stdio/ftell.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/ftell.c,v
retrieving revision 1.7
diff -c -p -r1.7 ftell.c
*** libc/stdio/ftell.c 23 Apr 2004 20:01:55 -0000 1.7
--- libc/stdio/ftell.c 5 Jan 2005 13:59:54 -0000
*************** _DEFUN(_ftell_r, (ptr, fp),
*** 143,149 ****
if (HASUB (fp))
pos -= fp->_ur;
}
! else if (fp->_flags & __SWR && fp->_p != NULL)
{
/*
* Writing. Any buffered characters cause the
--- 143,149 ----
if (HASUB (fp))
pos -= fp->_ur;
}
! else if ((fp->_flags & __SWR) && fp->_p != NULL)
{
/*
* Writing. Any buffered characters cause the
brgds, H-P
More information about the Newlib
mailing list