This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in stdio.h optimizations


Hi,

There is a small problem with the fread_unlocked optimization.  This
patch fixes it.

Mark


1998-11-25  Mark Kettenis  <kettenis@phys.uva.nl>

	* libio/bits/stdio.h (fread_unlocked): Add missing parentheses
	around parameter n.


--- /home/kettenis/CVS/libc/libio/bits/stdio.h	Wed Nov 18 21:52:53 1998
+++ libc/libio/bits/stdio.h	Wed Nov 25 22:35:52 1998
@@ -144,7 +144,7 @@
 		      || (__builtin_constant_p (n) && (n) == 0))	      \
 			/* Evaluate all parameters once.  */		      \
 		     ? ((void) (ptr), (void) (stream), (void) (size),	      \
-			(void) n, 0)					      \
+			(void) (n), 0)					      \
 		     : fread_unlocked (ptr, size, n, stream))))
 
 # define fwrite_unlocked(ptr, size, n, stream) \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]