aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/ndb
diff options
context:
space:
mode:
authorDan Cross <cross@gajendra.net>2020-01-10 14:44:21 +0000
committerDan Cross <cross@gajendra.net>2020-01-10 14:54:30 +0000
commitfa325e9b42b0bdfb48857d1958d9fb7ceac55151 (patch)
tree81d26256d152435135bcb1ae43121979a49f5f2b /src/cmd/ndb
parent77a0a5b5194d4441c86de097f2aae297cb75e2c2 (diff)
downloadplan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.gz
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.bz2
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.zip
Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
Diffstat (limited to 'src/cmd/ndb')
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/convDNS2M.c0
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/convM2DNS.c0
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/dblookup.c16
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/dn.c8
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/dnarea.c3
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/dnnotify.c0
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/dnresolve.c18
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/dns.c2
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/dns.h2
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/dnsdebug.c2
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/dnserver.c4
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/dnsquery.c0
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/dnstcp.c0
-rw-r--r--src/cmd/ndb/dntcpserver.c2
-rw-r--r--[-rwxr-xr-x]src/cmd/ndb/dnudpserver.c1
-rw-r--r--src/cmd/ndb/ndbmkhash.c2
-rw-r--r--src/cmd/ndb/ndbquery.c2
-rw-r--r--src/cmd/ndb/runproc.c1
18 files changed, 30 insertions, 33 deletions
diff --git a/src/cmd/ndb/convDNS2M.c b/src/cmd/ndb/convDNS2M.c
index 60fd9402..60fd9402 100755..100644
--- a/src/cmd/ndb/convDNS2M.c
+++ b/src/cmd/ndb/convDNS2M.c
diff --git a/src/cmd/ndb/convM2DNS.c b/src/cmd/ndb/convM2DNS.c
index 8e1fd0ce..8e1fd0ce 100755..100644
--- a/src/cmd/ndb/convM2DNS.c
+++ b/src/cmd/ndb/convM2DNS.c
diff --git a/src/cmd/ndb/dblookup.c b/src/cmd/ndb/dblookup.c
index ca73184a..067ba444 100755..100644
--- a/src/cmd/ndb/dblookup.c
+++ b/src/cmd/ndb/dblookup.c
@@ -463,13 +463,13 @@ soarr(Ndbtuple *entry, Ndbtuple *pair)
rp->rmb = dnlookup(mailbox, Cin, 1);
}
- /* hang dns slaves off of the soa. this is
+ /* hang dns slaves off of the soa. this is
* for managing the area.
*/
for(t = entry; t != nil; t = t->entry)
if(strcmp(t->attr, "dnsslave") == 0)
addserver(&rp->soa->slaves, t->val);
-
+
return rp;
}
@@ -647,11 +647,11 @@ db2cache(int doit)
unlock(&dblock);
return;
}
-
+
/* forget our area definition */
freearea(&owned);
freearea(&delegated);
-
+
/* reopen all the files (to get oldest for time stamp) */
for(ndb = db; ndb; ndb = ndb->next)
ndbreopen(ndb);
@@ -659,14 +659,14 @@ db2cache(int doit)
if(cachedb){
/* mark all db records as timed out */
dnagedb();
-
+
/* read in new entries */
for(ndb = db; ndb; ndb = ndb->next)
dbfile2cache(ndb);
-
+
/* mark as authentic anything in our domain */
dnauthdb();
-
+
/* remove old entries */
dnageall(1);
} else {
@@ -697,7 +697,7 @@ lookupinfo(char *attr)
snprint(buf, sizeof buf, "%I", ipaddr);
a[0] = attr;
-
+
lock(&dblock);
if(opendatabase() < 0){
unlock(&dblock);
diff --git a/src/cmd/ndb/dn.c b/src/cmd/ndb/dn.c
index 8b874030..5a37eefa 100755..100644
--- a/src/cmd/ndb/dn.c
+++ b/src/cmd/ndb/dn.c
@@ -67,7 +67,7 @@ char *rrtname[Tall+2] =
"cert",
nil,
nil,
-
+
/* 40 */ nil, nil, nil, nil, nil, nil, nil, nil,
/* 48 */ nil, nil, nil, nil, nil, nil, nil, nil,
/* 56 */ nil, nil, nil, nil, nil, nil, nil, nil,
@@ -94,7 +94,7 @@ char *rrtname[Tall+2] =
/* 224 */ nil, nil, nil, nil, nil, nil, nil, nil,
/* 232 */ nil, nil, nil, nil, nil, nil, nil, nil,
/* 240 */ nil, nil, nil, nil, nil, nil, nil, nil,
-/* 248 */ nil, nil, nil,
+/* 248 */ nil, nil, nil,
"ixfr",
"axfr",
@@ -1318,7 +1318,7 @@ randomize(RR *rp)
if(x->type != Ta && x->type != Tmx && x->type != Tns)
return rp;
- base = rp;
+ base = rp;
n = rand();
last = first = nil;
@@ -1564,7 +1564,7 @@ copyserverlist(Server *s)
{
Server *ns;
-
+
for(ns = nil; s != nil; s = s->next)
addserver(&ns, s->name);
return ns;
diff --git a/src/cmd/ndb/dnarea.c b/src/cmd/ndb/dnarea.c
index 05c9d004..bb4d050c 100755..100644
--- a/src/cmd/ndb/dnarea.c
+++ b/src/cmd/ndb/dnarea.c
@@ -96,7 +96,7 @@ refresh_areas(Area *s)
{
Waitmsg *w;
char *argv[3];
-
+
argv[0] = zonerefreshprogram;
argv[1] = "XXX";
argv[2] = nil;
@@ -115,4 +115,3 @@ refresh_areas(Area *s)
free(w);
}
}
-
diff --git a/src/cmd/ndb/dnnotify.c b/src/cmd/ndb/dnnotify.c
index 8e4b3075..8e4b3075 100755..100644
--- a/src/cmd/ndb/dnnotify.c
+++ b/src/cmd/ndb/dnnotify.c
diff --git a/src/cmd/ndb/dnresolve.c b/src/cmd/ndb/dnresolve.c
index 979abe4e..366521b6 100755..100644
--- a/src/cmd/ndb/dnresolve.c
+++ b/src/cmd/ndb/dnresolve.c
@@ -71,13 +71,13 @@ dnresolve(char *name, int class, int type, Request *req, RR **cn, int depth, int
rp = nil;
break;
}
-
+
name = rp->host->name;
if(cn)
rrcat(cn, rp);
else
rrfreelist(rp);
-
+
rp = dnresolve1(name, class, type, req, depth, recurse);
}
}
@@ -126,7 +126,7 @@ dnresolve1(char *name, int class, int type, Request *req, int depth, int recurse
rrfreelist(rp);
/*
- * try the cache for a canonical name. if found punt
+ * try the cache for a canonical name. if found punt
* since we'll find it during the canonical name search
* in dnresolve().
*/
@@ -242,7 +242,7 @@ walkup(char *name)
}
/*
- * Get a udpport for requests and replies.
+ * Get a udpport for requests and replies.
*/
int
udpport(void)
@@ -310,7 +310,7 @@ readreply(int fd, DN *dp, int type, ushort req,
len = udpreadtimeout(fd, (Udphdr*)ibuf, ibuf+Udphdrsize, Maxudpin, (endtime-now)*1000);
if(len < 0)
return -1; /* timed out */
-
+
/* convert into internal format */
memset(mp, 0, sizeof(*mp));
err = convM2DNS(&ibuf[Udphdrsize], len, mp);
@@ -357,13 +357,13 @@ udpreadtimeout(int fd, Udphdr *h, void *data, int n, int ms)
{
fd_set rd;
struct timeval tv;
-
+
FD_ZERO(&rd);
FD_SET(fd, &rd);
-
+
tv.tv_sec = ms/1000;
tv.tv_usec = (ms%1000)*1000;
-
+
if(select(fd+1, &rd, 0, 0, &tv) != 1)
return -1;
return udpread(fd, h, data, n);
@@ -512,7 +512,7 @@ cacheneg(DN *dp, int type, int rcode, RR *soarr)
soarr->next = nil;
}
soaowner = soarr->owner;
- } else
+ } else
soaowner = nil;
/* the attach can cause soarr to be freed so mine it now */
diff --git a/src/cmd/ndb/dns.c b/src/cmd/ndb/dns.c
index 05a5dd45..cb317052 100755..100644
--- a/src/cmd/ndb/dns.c
+++ b/src/cmd/ndb/dns.c
@@ -170,7 +170,7 @@ threadmain(int argc, char *argv[])
default:
usage();
}ARGEND
-
+
if(argc)
usage();
if(serveudp && servetcp)
diff --git a/src/cmd/ndb/dns.h b/src/cmd/ndb/dns.h
index 9825f0bd..fbd114f3 100755..100644
--- a/src/cmd/ndb/dns.h
+++ b/src/cmd/ndb/dns.h
@@ -26,7 +26,7 @@ enum
/* query types (all RR types are also queries) */
Tixfr= 251, /* incremental zone transfer */
Taxfr= 252, /* zone transfer */
- Tmailb= 253, /* { Tmb, Tmg, Tmr } */
+ Tmailb= 253, /* { Tmb, Tmg, Tmr } */
Tall= 255, /* all records */
/* classes */
diff --git a/src/cmd/ndb/dnsdebug.c b/src/cmd/ndb/dnsdebug.c
index 0818b85f..c3ad3e13 100755..100644
--- a/src/cmd/ndb/dnsdebug.c
+++ b/src/cmd/ndb/dnsdebug.c
@@ -331,7 +331,7 @@ void
preloadserveraddrs(void)
{
RR *rp, **l, *first;
-
+
l = &first;
for(rp = serveraddrs; rp != nil; rp = rp->next){
rrcopy(rp, l);
diff --git a/src/cmd/ndb/dnserver.c b/src/cmd/ndb/dnserver.c
index 509734b0..660006bd 100755..100644
--- a/src/cmd/ndb/dnserver.c
+++ b/src/cmd/ndb/dnserver.c
@@ -81,7 +81,7 @@ dnserver(DNSmsg *reqp, DNSmsg *repp, Request *req)
nsdp = dnlookup(cp, repp->qd->owner->class, 0);
if(nsdp == 0)
continue;
-
+
repp->ns = rrlookup(nsdp, Tns, OKneg);
if(repp->ns){
/* don't pass on anything we know is wrong */
@@ -91,7 +91,7 @@ dnserver(DNSmsg *reqp, DNSmsg *repp, Request *req)
}
break;
}
-
+
repp->ns = dblookup(cp, repp->qd->owner->class, Tns, 0, 0);
if(repp->ns)
break;
diff --git a/src/cmd/ndb/dnsquery.c b/src/cmd/ndb/dnsquery.c
index dc7ae06b..dc7ae06b 100755..100644
--- a/src/cmd/ndb/dnsquery.c
+++ b/src/cmd/ndb/dnsquery.c
diff --git a/src/cmd/ndb/dnstcp.c b/src/cmd/ndb/dnstcp.c
index 3d4d1e90..3d4d1e90 100755..100644
--- a/src/cmd/ndb/dnstcp.c
+++ b/src/cmd/ndb/dnstcp.c
diff --git a/src/cmd/ndb/dntcpserver.c b/src/cmd/ndb/dntcpserver.c
index 13161548..713331f4 100644
--- a/src/cmd/ndb/dntcpserver.c
+++ b/src/cmd/ndb/dntcpserver.c
@@ -269,7 +269,7 @@ static int
tcpannounce(char *mntpt)
{
int fd;
-
+
USED(mntpt);
if((fd=announce(tcpaddr, adir)) < 0)
warning("announce %s: %r", tcpaddr);
diff --git a/src/cmd/ndb/dnudpserver.c b/src/cmd/ndb/dnudpserver.c
index 9f84125c..a84cd050 100755..100644
--- a/src/cmd/ndb/dnudpserver.c
+++ b/src/cmd/ndb/dnudpserver.c
@@ -206,4 +206,3 @@ dnudpserver(void *v)
for(i=0; i<Maxactive; i++)
proccreate(udpproc, (void*)(uintptr)fd, STACK);
}
-
diff --git a/src/cmd/ndb/ndbmkhash.c b/src/cmd/ndb/ndbmkhash.c
index 507bd7c7..ea334bf7 100644
--- a/src/cmd/ndb/ndbmkhash.c
+++ b/src/cmd/ndb/ndbmkhash.c
@@ -68,7 +68,7 @@ main(int argc, char **argv)
{
Ndbtuple *t, *nt;
int n;
- Dir *d;
+ Dir *d;
uchar buf[8];
char file[128];
int fd;
diff --git a/src/cmd/ndb/ndbquery.c b/src/cmd/ndb/ndbquery.c
index 65bc0472..85b72b1e 100644
--- a/src/cmd/ndb/ndbquery.c
+++ b/src/cmd/ndb/ndbquery.c
@@ -67,7 +67,7 @@ main(int argc, char **argv)
default:
usage();
}
-
+
db = ndbopen(dbfile);
if(db == 0){
fprint(2, "no db files\n");
diff --git a/src/cmd/ndb/runproc.c b/src/cmd/ndb/runproc.c
index db344f97..5d1274af 100644
--- a/src/cmd/ndb/runproc.c
+++ b/src/cmd/ndb/runproc.c
@@ -34,4 +34,3 @@ runproc(char *file, char **v, int devnull)
}
return runprocfd(file, v, fd);
}
-