소스 검색

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.
Paul Eggert 10 년 전
부모
커밋
7bf812579c
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      src/common.h

+ 6 - 4
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.  */