From: Mohammed Javid<mjavid@codeaurora.org>
Date: Wed, 13 Aug 2017 12:29:42 -0700
Subject: [PATCH] pimd:Resolves wrong missing if clause gaurds error and left shift of negative value error for pyro

diff -rupN before-patch/pimd.h after-patch/pimd.h
--- before-patch/pimd.h	2017-09-12 19:53:38.986149100 +0530
+++ after-patch/pimd.h	2017-09-13 09:38:26.213203012 +0530
@@ -311,7 +311,7 @@ typedef struct pim_jp_encod_grp_ {

 #define MASKLEN_TO_MASK(masklen, mask)                                       \
 do {                                                                         \
-    (mask) = (masklen)? htonl(~0 << ((sizeof((mask)) << 3) - (masklen))) : 0;\
+    (mask) = (masklen)? htonl(~0u << ((sizeof((mask)) << 3) - (masklen))) : 0;\
 } while (0)


diff -rupN before-patch/trace.c after-patch/trace.c
--- before-patch/trace.c	2017-09-12 20:03:03.890409800 +0530
+++ after-patch/trace.c	2017-09-12 14:48:25.535799800 +0530
@@ -357,7 +357,7 @@ accept_mtrace(src, dst, group, data, no,
     if ((rcount + 1 == no) || (mrt == NULL) || (mrt->metric == 1)) {
         resptype = IGMP_MTRACE_RESP;
         dst = qry->tr_raddr;
-    } else
+    } else {

 #if 0   /* TODO */
     if (!can_mtrace(rt->rt_parent, rt->rt_gateway)) {
@@ -375,6 +375,7 @@ accept_mtrace(src, dst, group, data, no,
 #if 0   /* TODO */
     }
 #endif
+    }
     if (IN_MULTICAST(ntohl(dst))) {
     /*
     * Send the reply on a known multicast capable vif.

