]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-icmp.c
Fix incompatible pointer types with time functions calls on Windows
[tcpdump] / print-icmp.c
index 46af4f35df4b51a12e8ef0e6f0e3d63db6880fdd..05dc0555bee146b8c8aa90854ccd0938a66157f0 100644 (file)
@@ -21,9 +21,7 @@
 
 /* \summary: Internet Control Message Protocol (ICMP) printer */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "netdissect-stdinc.h"
 
@@ -499,7 +497,7 @@ icmp_print(netdissect_options *ndo, const u_char *bp, u_int plen,
        const char *str;
        const uint8_t *obj_tptr;
        u_int hlen;
-       char buf[MAXHOSTNAMELEN + 100];
+       char buf[512];
        struct cksum_vec vec[1];
 
        ndo->ndo_protocol = "icmp";
@@ -754,7 +752,7 @@ icmp_print(netdissect_options *ndo, const u_char *bp, u_int plen,
                        break;
                }
                idp = (const struct id_rdiscovery *)&dp->icmp_data;
-               while (num > 0) {
+               while (num != 0) {
                        (void)snprintf(cp, sizeof(buf) - (cp - buf), " {%s %u}",
                            GET_IPADDR_STRING(idp->ird_addr),
                            GET_BE_U_4(idp->ird_pref));