]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib/plist: Add some required parentheses, according to clang-analyzer
authorPaul Jakma <paul@opensourcerouting.org>
Fri, 19 Sep 2014 15:55:46 +0000 (16:55 +0100)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Thu, 26 May 2016 01:09:17 +0000 (01:09 +0000)
(cherry picked from commit 18f420e9f99e7f6557cf5877673cd6e71ac32192)

lib/plist.c

index 99653b93a208cabca024f1dbbdf7bb4f73bca963..12c71791ce59abaf1f3e1fe41b61173ce88df9b6 100644 (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. */