lib/plist: Add some required parentheses, according to clang-analyzer

(cherry picked from commit 18f420e9f99e7f6557cf5877673cd6e71ac32192)
This commit is contained in:
Paul Jakma 2014-09-19 16:55:46 +01:00 committed by Daniel Walton
parent 5595708e25
commit 63a2a35418

View File

@ -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. */