bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] fts: clarify ISSET


From: Paul Eggert
Subject: [PATCH 1/3] fts: clarify ISSET
Date: Tue, 6 Dec 2022 10:43:57 -0800

* lib/fts.c (ISSET): Refactor to clarify boolean usage.
---
 ChangeLog | 5 +++++
 lib/fts.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 576db7231d..08436174d7 100644
--- 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.
diff --git a/lib/fts.c b/lib/fts.c
index 5811f6ea20..8d2a5d2d90 100644
--- 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.
-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]