From: Paul Eggert Date: Fri, 12 Dec 2014 03:01:57 +0000 (-0800) Subject: tar: port ISFOUND, WASFOUND to C89 X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=7bf812579c1cfead7a06d9cab78621bf120b80e4;p=chaz%2Ftar tar: port ISFOUND, WASFOUND to C89 Problem reported by Romano Maspero in: http://lists.gnu.org/archive/html/bug-tar/2014-12/msg00010.html * src/common.h (ISFOUND, WASFOUND): Port to C89. --- diff --git a/src/common.h b/src/common.h index 3cc2011..20cbb64 100644 --- a/src/common.h +++ b/src/common.h @@ -748,10 +748,12 @@ bool is_avoided_name (char const *name); bool contains_dot_dot (char const *name); -#define ISFOUND(c) ((occurrence_option == 0) ? (c)->found_count : \ - (c)->found_count == occurrence_option) -#define WASFOUND(c) ((occurrence_option == 0) ? (c)->found_count : \ - (c)->found_count >= occurrence_option) +#define ISFOUND(c) (occurrence_option == 0 \ + ? (c)->found_count != 0 \ + : (c)->found_count == occurrence_option) +#define WASFOUND(c) (occurrence_option == 0 \ + ? (c)->found_count != 0 \ + : (c)->found_count >= occurrence_option) /* Module tar.c. */