summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypserv/yp_dnslookup.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-02-06 13:30:31 +0000
committerdes <des@FreeBSD.org>2002-02-06 13:30:31 +0000
commit0f2cb9b020b907000a28323fc57a82fdb7d6626d (patch)
treed44f2702502c982570c85130c91c845a83ea8052 /usr.sbin/ypserv/yp_dnslookup.c
parent0e1bb965cc26648289a6a22baf0ad5ef4891edb4 (diff)
downloadFreeBSD-src-0f2cb9b020b907000a28323fc57a82fdb7d6626d.zip
FreeBSD-src-0f2cb9b020b907000a28323fc57a82fdb7d6626d.tar.gz
Apply the following mechanical transformations in preparation for
ansification and constification: s{\s+__P\((\(.*?\))\)}{$1}g; s{\(\s+}{\(}g; s{\s+\)}{\)}g; s{\s+,}{,}g; s{(\s+)(for|if|switch|while)\(}{$1$2 \(}g; s{return ([^\(].*?);}{return ($1);}g; s{([\w\)])([!=+/\*-]?=)([\w\(+-])}{$1 $2 $3}g; s{\s+$}{\n};g Also add $FreeBSD$ where needed. MFC after: 1 week
Diffstat (limited to 'usr.sbin/ypserv/yp_dnslookup.c')
-rw-r--r--usr.sbin/ypserv/yp_dnslookup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ypserv/yp_dnslookup.c b/usr.sbin/ypserv/yp_dnslookup.c
index fdbac25..0abffcd 100644
--- a/usr.sbin/ypserv/yp_dnslookup.c
+++ b/usr.sbin/ypserv/yp_dnslookup.c
@@ -103,7 +103,7 @@ static char *parse(hp)
#define BY_DNS_ID 1
#define BY_RPC_XID 2
-extern struct hostent *__dns_getanswer __P((char *, int, char *, int));
+extern struct hostent *__dns_getanswer(char *, int, char *, int);
static TAILQ_HEAD(dns_qhead, circleq_dnsentry) qhead;
@@ -202,7 +202,7 @@ static struct circleq_dnsentry *yp_find_dnsqent(id, type)
register struct circleq_dnsentry *q;
TAILQ_FOREACH(q, &qhead, links) {
- switch(type) {
+ switch (type) {
case BY_RPC_XID:
if (id == q->xid)
return(q);
@@ -232,7 +232,7 @@ static void yp_send_dns_reply(q, buf)
* Set up correct reply struct and
* XDR filter depending on ypvers.
*/
- switch(q->ypvers) {
+ switch (q->ypvers) {
case YPVERS:
bzero((char *)&result_v2, sizeof(result_v2));
@@ -319,7 +319,7 @@ void yp_prune_dnsq()
register struct circleq_dnsentry *q, *n;
q = TAILQ_FIRST(&qhead);
- while(q != NULL) {
+ while (q != NULL) {
q->ttl--;
n = TAILQ_NEXT(q, links);
if (!q->ttl) {
@@ -497,7 +497,7 @@ ypstat yp_async_lookup_addr(rqstp, addr)
}
/* Avoid transmitting dupe requests. */
- if (type == SOCK_DGRAM &&
+ if (type == SOCK_DGRAM &&
yp_find_dnsqent(svcudp_get_xid(rqstp->rq_xprt),BY_RPC_XID) != NULL)
return(YP_TRUE);
OpenPOWER on IntegriCloud