From: Paul Jakma Date: Fri, 19 Sep 2014 15:55:46 +0000 (+0100) Subject: lib/plist: Add some required parentheses, according to clang-analyzer X-Git-Tag: frr-2.0-rc1~792 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=63a2a3541828d438a0b6ecff013c4756aa447ac2;p=mirror%2Ffrr.git lib/plist: Add some required parentheses, according to clang-analyzer (cherry picked from commit 18f420e9f99e7f6557cf5877673cd6e71ac32192) --- diff --git a/lib/plist.c b/lib/plist.c index 99653b93a2..12c71791ce 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -962,16 +962,16 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name, #endif /* HAVE_IPV6 */ /* ge and le check. */ - if (genum && genum <= p.prefixlen) + if (genum && (genum <= p.prefixlen)) return vty_invalid_prefix_range (vty, prefix); - if (lenum && lenum <= p.prefixlen) + if (lenum && (lenum <= p.prefixlen)) return vty_invalid_prefix_range (vty, prefix); - if (lenum && genum > lenum) + if (lenum && (genum > lenum)) return vty_invalid_prefix_range (vty, prefix); - if (genum && lenum == (afi == AFI_IP ? 32 : 128)) + if (genum && (lenum == (afi == AFI_IP ? 32 : 128))) lenum = 0; /* Get prefix_list with name. */