]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-pim.c
msdp: do some additional bounds checks.
[tcpdump] / print-pim.c
index 761ab6e1fc3c03b59d5f6f0f669456beaa4b86b5..30dfaa838e4fb5e14640251fe83a5c971eaf1e3a 100644 (file)
@@ -21,9 +21,7 @@
 
 /* \summary: Protocol Independent Multicast (PIM) printer */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "netdissect-stdinc.h"
 
@@ -137,7 +135,7 @@ static const struct tok pimv2_df_election_flag_values[] = {
 
 /*
  * XXX: We consider a case where IPv6 is not ready yet for portability,
- * but PIM dependent defintions should be independent of IPv6...
+ * but PIM dependent definitions should be independent of IPv6...
  */
 
 struct pim {
@@ -256,7 +254,6 @@ pimv1_join_prune_print(netdissect_options *ndo,
        return;
 trunc:
        nd_print_trunc(ndo);
-       return;
 }
 
 void
@@ -338,7 +335,6 @@ pimv1_print(netdissect_options *ndo,
 
 trunc:
        nd_print_trunc(ndo);
-       return;
 }
 
 /*
@@ -450,7 +446,6 @@ cisco_autorp_print(netdissect_options *ndo,
 
 trunc:
        nd_print_trunc(ndo);
-       return;
 }
 
 void
@@ -602,8 +597,7 @@ pimv2_addr_print(netdissect_options *ndo,
                if (af == AF_INET) {
                        if (!silent)
                                ND_PRINT("%s", GET_IPADDR_STRING(bp));
-               }
-               else if (af == AF_INET6) {
+               } else if (af == AF_INET6) {
                        if (!silent)
                                ND_PRINT("%s", GET_IP6ADDR_STRING(bp));
                }
@@ -619,8 +613,7 @@ pimv2_addr_print(netdissect_options *ndo,
                                if (GET_U_1(bp + 1) != 32)
                                        ND_PRINT("/%u", GET_U_1(bp + 1));
                        }
-               }
-               else if (af == AF_INET6) {
+               } else if (af == AF_INET6) {
                        if (!silent) {
                                ND_PRINT("%s", GET_IP6ADDR_STRING(bp + 2));
                                if (GET_U_1(bp + 1) != 128)