]> Savannah Git Hosting - gnulib.git/commitdiff
fts: clarify ISSET
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 6 Dec 2022 17:56:55 +0000 (09:56 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 6 Dec 2022 18:42:45 +0000 (10:42 -0800)
* lib/fts.c (ISSET): Refactor to clarify boolean usage.

ChangeLog
lib/fts.c

index 576db7231dbb100d59dcb7d266eeaaf38db11cf4..08436174d73a2ee6f62a8e223b9f51c79964577d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-12-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+       fts: clarify ISSET
+       * lib/fts.c (ISSET): Refactor to clarify boolean usage.
+
 2022-12-05  Bruno Haible  <bruno@clisp.org>
 
        argp: Correct documentation.
index 5811f6ea207abfcaa5fb56be5aedcfdd02de7fe4..8d2a5d2d906b1c83cfdc8a87e1f5c024dcdff3b7 100644 (file)
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -235,7 +235,7 @@ static int      fts_safe_changedir (FTS *, FTSENT *, int, const char *)
 #define STREQ(a, b)     (strcmp (a, b) == 0)
 
 #define CLR(opt)        (sp->fts_options &= ~(opt))
-#define ISSET(opt)      (sp->fts_options & (opt))
+#define ISSET(opt)      ((sp->fts_options & (opt)) != 0)
 #define SET(opt)        (sp->fts_options |= (opt))
 
 /* FIXME: FTS_NOCHDIR is now misnamed.