ed(1): Fix [-Werror=logical-not-parentheses]
authorJohn Marino <draco@marino.st>
Tue, 10 Feb 2015 09:51:33 +0000 (10:51 +0100)
committerJohn Marino <draco@marino.st>
Tue, 10 Feb 2015 09:54:57 +0000 (10:54 +0100)
/usr/src/bin/ed/glbl.c:64:36: error: logical not is only applied to the
left hand side of comparison [-Werror=logical-not-parentheses]

Putting parenthese around the comparison makes gcc happy.

bin/ed/glbl.c

index 31b39b9..39503c7 100644 (file)
@@ -61,7 +61,7 @@ build_active_list(int isgcmd)
                        return ERR;
                if (isbinary)
                        NUL_TO_NEWLINE(s, lp->len);
-               if (!regexec(pat, s, 0, NULL, 0) == isgcmd &&
+               if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) &&
                    set_active_node(lp) < 0)
                        return ERR;
        }