From 63a2a3541828d438a0b6ecff013c4756aa447ac2 Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Fri, 19 Sep 2014 16:55:46 +0100 Subject: [PATCH] lib/plist: Add some required parentheses, according to clang-analyzer (cherry picked from commit 18f420e9f99e7f6557cf5877673cd6e71ac32192) --- lib/plist.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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. */ -- 2.39.5