diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-02-06 13:30:31 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-02-06 13:30:31 +0000 |
commit | ed4d1c46a27632aa553e7c24c969262bfc2d5c97 (patch) | |
tree | d44f2702502c982570c85130c91c845a83ea8052 /usr.sbin/ypserv/yp_dnslookup.c | |
parent | 8bf216d4a39b268cd561eb5e3a90ba41ef5e733f (diff) |
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
Notes
Notes:
svn path=/head/; revision=90297
Diffstat (limited to 'usr.sbin/ypserv/yp_dnslookup.c')
-rw-r--r-- | usr.sbin/ypserv/yp_dnslookup.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ypserv/yp_dnslookup.c b/usr.sbin/ypserv/yp_dnslookup.c index fdbac25c272a..0abffcd144cc 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); |