mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-17 08:39:10 +08:00
Update to FreeBSD head 2016-08-23
Git mirror commit 9fe7c416e6abb28b1398fd3e5687099846800cfd.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user