Out of the four macros two were never used, and the other two were used
only once. Use htonl() and htons() directly instead.
#include "netdissect-stdinc.h"
-#ifndef NTOHL
-#define NTOHL(x) (x) = ntohl(x)
-#define NTOHS(x) (x) = ntohs(x)
-#define HTONL(x) (x) = htonl(x)
-#define HTONS(x) (x) = htons(x)
-#endif
-
#ifdef _WIN32
/*
* We have our own ether_ntohost(), reading from the system's
int n;
static char buf[sizeof(".xxx.xxx.xxx.xxx")];
- NTOHL(addr);
+ addr = ntohl(addr);
cp = buf + sizeof(buf);
*--cp = '\0';
tp->nxt = newhnamemem(ndo);
cp = buf;
- NTOHS(port);
+ port = ntohs(port);
*cp++ = hex[port >> 12 & 0xf];
*cp++ = hex[port >> 8 & 0xf];
*cp++ = hex[port >> 4 & 0xf];