findutils-patches
[Top][All Lists]
Advanced

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

[PATCH 2/2] parser.c: avoid "Condition 'nflags' is always false" in pars


From: Bernhard Voelker
Subject: [PATCH 2/2] parser.c: avoid "Condition 'nflags' is always false" in parse_version
Date: Sun, 8 Dec 2019 23:01:21 +0100

* find/parser.c (parse_version): Remove 'nflags' variable.

Found by cppcheck.
---
 find/parser.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/find/parser.c b/find/parser.c
index 5770487b..f7fcaa02 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -2540,19 +2540,11 @@ parse_version (const struct parser_table* entry, char 
**argv, int *arg_ptr)
   flags = 0;
   if (is_fts_enabled (&flags))
     {
-      int nflags = 0;
       printf ("FTS(");
       has_features = true;
 
       if (flags & FTS_CWDFD)
-       {
-         if (nflags)
-           {
-             printf (",");
-           }
-         printf ("FTS_CWDFD");
-         has_features = true;
-       }
+       printf ("FTS_CWDFD");
       printf (") ");
     }
 
-- 
2.24.0




reply via email to

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