]> Savannah Git Hosting - gnulib.git/commitdiff
fnmatch: fix typo introduced on 2016-08-17
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 26 Nov 2016 02:45:05 +0000 (18:45 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 26 Nov 2016 02:47:15 +0000 (18:47 -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
lib/fnmatch.c

index 2047998ae4dbfca78cb666e063ebe31e8a01f559..26eb3d5da2d56b3afc5c347a222486c24a8080f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2016-11-25  Paul Eggert  <eggert@cs.ucla.edu>
 
+       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.
index bd9e587bac594bf325d8390c6617df061f4e68ff..75b85c05db766ffcc6f340a493db967f65baa25a 100644 (file)
@@ -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