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

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix assert.h


Hi!

One more thing about assert.h:

2003-08-15  Jakub Jelinek  <jakub@redhat.com>

	* assert/assert.h (assert_perror): Use __builtin_expect for gcc >=
	3.0, not for !gcc or gcc < 3.0.

--- libc/assert/assert.h.jj	2003-08-15 08:38:52.000000000 -0400
+++ libc/assert/assert.h	2003-08-15 11:35:16.000000000 -0400
@@ -102,12 +102,12 @@ __END_DECLS
 # ifdef	__USE_GNU
 #  if __GNUC_PREREQ (3, 0)
 #   define assert_perror(errnum) \
-  (__ASSERT_VOID_CAST (!(errnum) ? 0 :					      \
+  (__ASSERT_VOID_CAST (__builtin_expect (!(errnum), 1) ? 0 :		      \
 		       (__assert_perror_fail ((errnum), __FILE__, __LINE__,   \
 					      __ASSERT_FUNCTION), 0)))
 #  else
 #   define assert_perror(errnum) \
-  (__ASSERT_VOID_CAST (__builtin_expect (!(errnum), 1) ? 0 :		      \
+  (__ASSERT_VOID_CAST (!(errnum) ? 0 :					      \
 		       (__assert_perror_fail ((errnum), __FILE__, __LINE__,   \
 					      __ASSERT_FUNCTION), 0)))
 #  endif

	Jakub


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