From 0a2d091427da29e9d956b108801cdfdc27713a09 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 25 Nov 2016 18:45:05 -0800 Subject: [PATCH] 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. --- ChangeLog | 4 ++++ lib/fnmatch.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2047998ae4..26eb3d5da2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2016-11-25 Paul Eggert + 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 bd9e587bac..75b85c05db 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.39.5