diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2012-11-24 15:12:49 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2012-11-24 15:12:49 +0000 |
commit | b2856d42893f9d7102ddca106b2ce0f47daca64e (patch) | |
tree | 7d6c983167252826a92df0c73c9da1eaaaed0a03 /lib/libc/asr/asr_debug.c | |
parent | bbbaec087ecd4abc69d10d21d9b59a895e3aa7ee (diff) |
knf
Diffstat (limited to 'lib/libc/asr/asr_debug.c')
-rw-r--r-- | lib/libc/asr/asr_debug.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/libc/asr/asr_debug.c b/lib/libc/asr/asr_debug.c index 617aed64649..3c50eeafd86 100644 --- a/lib/libc/asr/asr_debug.c +++ b/lib/libc/asr/asr_debug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asr_debug.c,v 1.9 2012/11/24 13:59:53 eric Exp $ */ +/* $OpenBSD: asr_debug.c,v 1.10 2012/11/24 15:12:48 eric Exp $ */ /* * Copyright (c) 2012 Eric Faurot <eric@openbsd.org> * @@ -14,9 +14,9 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + #include <sys/types.h> #include <sys/socket.h> - #include <netinet/in.h> #include <arpa/nameser.h> #include <arpa/inet.h> @@ -40,7 +40,7 @@ FILE *asr_debug = NULL; static const char * rcodetostr(uint16_t v) { - switch(v) { + switch (v) { case NOERROR: return "NOERROR"; case FORMERR: return "FORMERR"; case SERVFAIL: return "SERVFAIL"; @@ -83,7 +83,7 @@ print_rr(const struct rr *rr, char *buf, size_t max) max -= r; buf += r; - switch(rr->rr_type) { + switch (rr->rr_type) { case T_CNAME: print_dname(rr->rr.cname.cname, buf, max); break; @@ -152,7 +152,7 @@ print_header(const struct header *h, char *buf, size_t max) (h->flags & AA_MASK) ? "AA":" ", (h->flags & TC_MASK) ? "TC":" ", (h->flags & RD_MASK) ? "RD":" ", - (h->flags & RA_MASK) ? "RA":" ", + (h->flags & RA_MASK) ? "RA":" ", ((h->flags & Z_MASK) >> Z_SHIFT), rcodetostr(RCODE(h->flags)), h->qdcount, h->ancount, h->nscount, h->arcount); @@ -268,7 +268,7 @@ asr_dump_config(FILE *f, struct asr *a) fprintf(f, "STATIC CONF\n"); fprintf(f, "DOMAIN \"%s\"\n", ac->ac_domain); fprintf(f, "SEARCH\n"); - for(i = 0; i < ac->ac_domcount; i++) + for (i = 0; i < ac->ac_domcount; i++) fprintf(f, " \"%s\"\n", ac->ac_dom[i]); fprintf(f, "OPTIONS\n"); fprintf(f, " options:"); @@ -292,18 +292,18 @@ asr_dump_config(FILE *f, struct asr *a) fprintf(f, " ndots: %i\n", ac->ac_ndots); fprintf(f, " family:"); - for(i = 0; ac->ac_family[i] != -1; i++) + for (i = 0; ac->ac_family[i] != -1; i++) fprintf(f, " %s", (ac->ac_family[i] == AF_INET)?"inet":"inet6"); fprintf(f, "\n"); fprintf(f, "NAMESERVERS timeout=%i retry=%i\n", - ac->ac_nstimeout, - ac->ac_nsretries); - for(i = 0; i < ac->ac_nscount; i++) + ac->ac_nstimeout, + ac->ac_nsretries); + for (i = 0; i < ac->ac_nscount; i++) fprintf(f, " %s\n", print_sockaddr(ac->ac_ns[i], buf, sizeof buf)); fprintf(f, "HOSTFILE %s\n", ac->ac_hostfile); fprintf(f, "LOOKUP"); - for(i = 0; i < ac->ac_dbcount; i++) { + for (i = 0; i < ac->ac_dbcount; i++) { switch (ac->ac_db[i]) { case ASR_DB_FILE: fprintf(f, " file"); @@ -367,7 +367,7 @@ asr_querystr(int type) const char * asr_transitionstr(int type) { - switch(type) { + switch (type) { CASE(ASYNC_COND); CASE(ASYNC_YIELD); CASE(ASYNC_DONE); |