chiark / gitweb /
polypath.c: Fix a compiler warning
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 19 Nov 2019 01:16:29 +0000 (01:16 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 19 Nov 2019 20:27:57 +0000 (20:27 +0000)
  polypath.c:520:20: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
    520 |     *allreasonable *= reasonable;
        |                    ^~

This is not really a very helpful suggstion because there is no &&=.
Happily the compiler doesn't (currently) complain about &= which is
the same when both arguments are bools.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
polypath.c

index d47bef76b0fa81e5fe8108c0b519767ba086588f..64284a30fa17f29225f4a5273b91853db03f5d1a 100644 (file)
@@ -517,7 +517,7 @@ static void polypath_sendmsg_interf(struct polypath *st,
                      "%s has no suitable address to transmit %s",
                      interf->name, af_name(af));
 
-    *allreasonable *= reasonable;
+    *allreasonable &= reasonable;
 }
 
 static bool_t polypath_sendmsg(void *commst, struct buffer_if *buf,