mcast: ifma_protospec is pointer; use NULL for it.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 12 May 2014 13:22:40 +0000 (21:22 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 12 May 2014 13:22:40 +0000 (21:22 +0800)
sys/net/if.c
sys/netinet/in.c
sys/netinet/in_var.h
sys/netinet6/in6_var.h

index f694c18..612fe69 100644 (file)
@@ -2197,7 +2197,7 @@ if_addmulti(
        ifma->ifma_lladdr = llsa;
        ifma->ifma_ifp = ifp;
        ifma->ifma_refcount = 1;
-       ifma->ifma_protospec = 0;
+       ifma->ifma_protospec = NULL;
        rt_newmaddrmsg(RTM_NEWMADDR, ifma);
 
        /*
index 5524238..1a66c1b 100644 (file)
@@ -1363,7 +1363,7 @@ in_addmulti(struct in_addr *ap, struct ifnet *ifp)
         * If ifma->ifma_protospec is null, then if_addmulti() created
         * a new record.  Otherwise, we are done.
         */
-       if (ifma->ifma_protospec != 0) {
+       if (ifma->ifma_protospec != NULL) {
                crit_exit();
                return ifma->ifma_protospec;
        }
@@ -1408,7 +1408,7 @@ in_delmulti(struct in_multi *inm)
                 * the interface and nuke the packet.
                 */
                my_inm = *inm ;
-               ifma->ifma_protospec = 0;
+               ifma->ifma_protospec = NULL;
                LIST_REMOVE(inm, inm_link);
                kfree(inm, M_IPMADDR);
        }
index 4e5a2e2..946bc98 100644 (file)
@@ -210,7 +210,7 @@ do { \
                    (addr).s_addr) \
                        break; \
        } \
-       (inm) = ifma ? ifma->ifma_protospec : 0; \
+       (inm) = ifma ? ifma->ifma_protospec : NULL; \
 } while(0)
 
 /*
index 2e2876f..ffd8c96 100644 (file)
@@ -571,7 +571,7 @@ do { \
                                          &(addr))) \
                        break; \
        } \
-       (in6m) = (struct in6_multi *)(ifma ? ifma->ifma_protospec : 0); \
+       (in6m) = (struct in6_multi *)(ifma ? ifma->ifma_protospec : NULL); \
 } while(0)
 
 /*