[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] fnmatch: fix typo introduced on 2016-08-17
From: |
Paul Eggert |
Subject: |
[PATCH] fnmatch: fix typo introduced on 2016-08-17 |
Date: |
Fri, 25 Nov 2016 18:47:31 -0800 |
This fixes the port to non-GCC compilers that lack __builtin_expect.
* lib/fnmatch.c (__builtin_expect): Change A&&B to !A||B.
---
ChangeLog | 4 ++++
lib/fnmatch.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 2047998..26eb3d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2016-11-25 Paul Eggert <address@hidden>
+ fnmatch: fix typo introduced on 2016-08-17
+ This fixes the port to non-GCC compilers that lack __builtin_expect.
+ * lib/fnmatch.c (__builtin_expect): Change A&&B to !A||B.
+
dfa: simplify with new function fillset
* lib/dfa.c (fillset): New function.
Use it for clarity when applicable.
diff --git a/lib/fnmatch.c b/lib/fnmatch.c
index bd9e587..75b85c0 100644
--- a/lib/fnmatch.c
+++ b/lib/fnmatch.c
@@ -22,7 +22,7 @@
# define _GNU_SOURCE 1
#endif
-#if ! defined __builtin_expect && defined __GNUC__ && __GNUC__ < 3
+#if ! defined __builtin_expect && (!defined __GNUC__ || __GNUC__ < 3)
# define __builtin_expect(expr, expected) (expr)
#endif
--
2.7.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] fnmatch: fix typo introduced on 2016-08-17,
Paul Eggert <=