diff options
Diffstat (limited to 'freebsd/lib/libc/resolv/res_mkupdate.c')
-rw-r--r-- | freebsd/lib/libc/resolv/res_mkupdate.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/freebsd/lib/libc/resolv/res_mkupdate.c b/freebsd/lib/libc/resolv/res_mkupdate.c index fade9356..6b0c484f 100644 --- a/freebsd/lib/libc/resolv/res_mkupdate.c +++ b/freebsd/lib/libc/resolv/res_mkupdate.c @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include "port_before.h" -#include <sys/types.h> #include <rtems/bsd/sys/param.h> #include <netinet/in.h> @@ -56,7 +55,9 @@ __FBSDID("$FreeBSD$"); #include "port_after.h" /* Options. Leave them on. */ -#define DEBUG +#ifndef DEBUG +#define DEBUG +#endif #define MAXPORT 1024 static int getnum_str(u_char **, u_char *); @@ -127,7 +128,7 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { dpp = dnptrs; *dpp++ = buf; *dpp++ = NULL; - lastdnptr = dnptrs + sizeof dnptrs / sizeof dnptrs[0]; + lastdnptr = dnptrs + nitems(dnptrs); if (rrecp_start == NULL) return (-5); @@ -975,7 +976,7 @@ struct valuelist { static struct valuelist *servicelist, *protolist; static void -res_buildservicelist() { +res_buildservicelist(void) { struct servent *sp; struct valuelist *slp; @@ -1175,7 +1176,7 @@ res_protocolname(int num) { if (protolist == (struct valuelist *)0) res_buildprotolist(); pp = cgetprotobynumber(num); - if (pp == 0) { + if (pp == NULL) { (void) sprintf(number, "%d", num); return (number); } @@ -1190,7 +1191,7 @@ res_servicename(u_int16_t port, const char *proto) { /*%< Host byte order. */ if (servicelist == (struct valuelist *)0) res_buildservicelist(); ss = cgetservbyport(htons(port), proto); - if (ss == 0) { + if (ss == NULL) { (void) sprintf(number, "%d", port); return (number); } |