This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Bug in stdio.h optimizations
- To: libc-hacker@cygnus.com
- Subject: Bug in stdio.h optimizations
- From: Mark Kettenis <kettenis@phys.uva.nl>
- Date: Wed, 25 Nov 1998 22:45:21 +0100 (CET)
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) \