]> Dogcows Code - chaz/tar/commitdiff
tar: port ISFOUND, WASFOUND to C89
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 12 Dec 2014 03:01:57 +0000 (19:01 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 12 Dec 2014 03:02:43 +0000 (19:02 -0800)
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.

src/common.h

index 3cc2011508758d09a8f5e881bc02fe236d49a36d..20cbb6447a80b46da2e4aba470e1fcea6896df11 100644 (file)
@@ -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.  */
 
This page took 0.025332 seconds and 4 git commands to generate.