aboutsummaryrefslogtreecommitdiff
path: root/src/libndb
diff options
context:
space:
mode:
Diffstat (limited to 'src/libndb')
-rw-r--r--src/libndb/csipinfo.c2
-rw-r--r--src/libndb/dnsquery.c4
-rw-r--r--src/libndb/ndbaux.c2
-rw-r--r--src/libndb/ndbcache.c2
-rw-r--r--src/libndb/ndbfree.c2
-rw-r--r--src/libndb/ndbhash.c4
-rw-r--r--src/libndb/ndbopen.c2
-rw-r--r--src/libndb/ndbreorder.c2
-rw-r--r--src/libndb/sysdnsquery.c32
-rw-r--r--src/libndb/testdns.c9
10 files changed, 30 insertions, 31 deletions
diff --git a/src/libndb/csipinfo.c b/src/libndb/csipinfo.c
index 76f3d8e0..6ffaf172 100644
--- a/src/libndb/csipinfo.c
+++ b/src/libndb/csipinfo.c
@@ -34,7 +34,7 @@ csipinfo(char *netroot, char *attr, char *val, char **list, int n)
break;
p = seprint(p, e, " %s", *list++);
}
-
+
if(write(fd, line, strlen(line)) < 0){
close(fd);
return 0;
diff --git a/src/libndb/dnsquery.c b/src/libndb/dnsquery.c
index 4cf8735a..74460b14 100644
--- a/src/libndb/dnsquery.c
+++ b/src/libndb/dnsquery.c
@@ -119,11 +119,11 @@ doquery(int fd, char *dn, char *type)
snprint(buf, sizeof(buf), "!%s %s", dn, type);
if(write(fd, buf, strlen(buf)) < 0)
return nil;
-
+
seek(fd, 0, 0);
first = last = nil;
-
+
for(;;){
n = read(fd, buf, sizeof(buf)-2);
if(n <= 0)
diff --git a/src/libndb/ndbaux.c b/src/libndb/ndbaux.c
index 94246fc6..a2688736 100644
--- a/src/libndb/ndbaux.c
+++ b/src/libndb/ndbaux.c
@@ -60,7 +60,7 @@ _ndbparsetuple(char *cp, Ndbtuple **tp)
}
/*
- * parse all tuples in a line. we assume that the
+ * parse all tuples in a line. we assume that the
* line ends in a '\n'.
*
* the tuples are linked as a list using ->entry and
diff --git a/src/libndb/ndbcache.c b/src/libndb/ndbcache.c
index 80dbc35b..d02530f5 100644
--- a/src/libndb/ndbcache.c
+++ b/src/libndb/ndbcache.c
@@ -9,7 +9,7 @@ struct Ndbcache
char *attr;
char *val;
Ndbs s;
- Ndbtuple *t;
+ Ndbtuple *t;
};
enum
diff --git a/src/libndb/ndbfree.c b/src/libndb/ndbfree.c
index 647bff03..50626131 100644
--- a/src/libndb/ndbfree.c
+++ b/src/libndb/ndbfree.c
@@ -61,5 +61,5 @@ ndbnew(char *attr, char *val)
t->val = t->valbuf;
if(val != nil)
ndbsetval(t, val, strlen(val));
- return t;
+ return t;
}
diff --git a/src/libndb/ndbhash.c b/src/libndb/ndbhash.c
index 4f9cb4b6..8dee18a5 100644
--- a/src/libndb/ndbhash.c
+++ b/src/libndb/ndbhash.c
@@ -198,7 +198,7 @@ ndbsnext(Ndbs *s, char *attr, char *val)
ndbfree(t);
} else if(s->type == Cptr){
if(Bseek(&db->b, s->ptr, 0) < 0)
- break;
+ break;
s->ptr = s->ptr1;
s->type = Cptr1;
t = ndbparse(db);
@@ -218,7 +218,7 @@ ndbsnext(Ndbs *s, char *attr, char *val)
s->type = Cptr;
} else { /* end of hash chain */
if(Bseek(&db->b, s->ptr, 0) < 0)
- break;
+ break;
s->ptr = NDBNAP;
t = ndbparse(db);
if(t == 0)
diff --git a/src/libndb/ndbopen.c b/src/libndb/ndbopen.c
index fdda79ec..1002b4d6 100644
--- a/src/libndb/ndbopen.c
+++ b/src/libndb/ndbopen.c
@@ -77,7 +77,7 @@ doopen(char *file, char *rel)
* Unrooted paths are taken relative to db we opened.
*/
if(file[0]!='/' && rel && (p=strrchr(rel, '/'))!=nil)
- snprint(db->file, sizeof(db->file), "%.*s/%s",
+ snprint(db->file, sizeof(db->file), "%.*s/%s",
utfnlen(rel, p-rel), rel, file);
else
strncpy(db->file, file, sizeof(db->file)-1);
diff --git a/src/libndb/ndbreorder.c b/src/libndb/ndbreorder.c
index 390d7818..c25d7b5f 100644
--- a/src/libndb/ndbreorder.c
+++ b/src/libndb/ndbreorder.c
@@ -27,7 +27,7 @@ ndbreorder(Ndbtuple *t, Ndbtuple *x)
for(nt = t; nt->entry != last->line; nt = nt->entry)
;
nt->entry = nil;
-
+
/* switch */
for(nt = last; nt->entry != nil; nt = nt->entry)
;
diff --git a/src/libndb/sysdnsquery.c b/src/libndb/sysdnsquery.c
index 0a771e2b..1f6cbb58 100644
--- a/src/libndb/sysdnsquery.c
+++ b/src/libndb/sysdnsquery.c
@@ -20,11 +20,11 @@ Ndbtuple*
dnsquery(char *net, char *val, char *type)
{
static int init;
- char rip[128];
+ char rip[128];
Ndbtuple *t;
USED(net);
-
+
if(!init){
init = 1;
fmtinstall('I', eipfmt);
@@ -32,17 +32,17 @@ dnsquery(char *net, char *val, char *type)
/* give up early on stupid questions - vwhois */
if(strcmp(val, "::") == 0 || strcmp(val, "0.0.0.0") == 0)
return nil;
-
+
/* zero out the error string */
werrstr("");
-
+
/* if this is a reverse lookup, first look up the domain name */
if(strcmp(type, "ptr") == 0){
mkptrname(val, rip, sizeof rip);
t = doquery(rip, "ptr");
}else
t = doquery(val, type);
-
+
return t;
}
@@ -123,7 +123,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 */
@@ -173,7 +173,7 @@ doquery(char *name, char *type)
qdcount = (buf[4]<<8)|buf[5];
ancount = (buf[6]<<8)|buf[7];
-
+
p = buf+12;
p = skipquestion(buf, buf+n, p, qdcount);
p = unpack(buf, buf+n, p, &t, ancount);
@@ -215,7 +215,7 @@ static char*
type2name(int t)
{
int i;
-
+
for(i=0; i<nelem(dnsnames); i++)
if(dnsnames[i].t == t)
return dnsnames[i].s;
@@ -226,7 +226,7 @@ static int
name2type(char *name)
{
int i;
-
+
for(i=0; i<nelem(dnsnames); i++)
if(strcmp(name, dnsnames[i].s) == 0)
return dnsnames[i].t;
@@ -238,7 +238,7 @@ skipquestion(uchar *buf, uchar *ebuf, uchar *p, int n)
{
int i, len;
char tmp[100];
-
+
for(i=0; i<n; i++){
if((len = dn_expand(buf, ebuf, p, tmp, sizeof tmp)) <= 0)
return nil;
@@ -304,11 +304,11 @@ rrnext(uchar *buf, uchar *ebuf, uchar *p, Ndbtuple **tt)
return nil;
}
p += len;
-
+
rrtype = G2(p);
rrlen = G2(p+8);
p += 10;
-
+
if(rrtype == Tptr)
first = ndbnew("ptr", b);
else
@@ -363,19 +363,19 @@ rrnext(uchar *buf, uchar *ebuf, uchar *p, Ndbtuple **tt)
break;
case Tsoa:
- t = rrunpack(buf, ebuf, &p, "NNLLLLL", "ns", "mbox",
+ t = rrunpack(buf, ebuf, &p, "NNLLLLL", "ns", "mbox",
"serial", "refresh", "retry", "expire", "ttl");
break;
case Tkey:
t = rrunpack(buf, ebuf, &p, "SCCY", "flags", "proto", "alg", "key");
break;
-
+
case Tsig:
t = rrunpack(buf, ebuf, &p, "SCCLLLSNY", "type", "alg", "labels",
"ttl", "exp", "incep", "tag", "signer", "sig");
break;
-
+
case Tcert:
t = rrunpack(buf, ebuf, &p, "SSCY", "type", "tag", "alg", "cert");
break;
@@ -398,7 +398,7 @@ rrunpack(uchar *buf, uchar *ebuf, uchar **pp, char *fmt, ...)
va_list arg;
Ndbtuple *t, *first, *last;
char tmp[Ndbvlen];
-
+
p = *pp;
va_start(arg, fmt);
first = nil;
diff --git a/src/libndb/testdns.c b/src/libndb/testdns.c
index 6c72c5d8..96cbec57 100644
--- a/src/libndb/testdns.c
+++ b/src/libndb/testdns.c
@@ -7,22 +7,22 @@ void
main(int argc, char **argv)
{
Ndbtuple *t, *t0;
-
+
ARGBEGIN{
default:
goto usage;
}ARGEND
-
+
if(argc != 2){
usage:
fprint(2, "usage: testdns name val\n");
exits("usage");
}
-
+
quotefmtinstall();
if((t = dnsquery(nil, argv[0], argv[1])) == nil)
sysfatal("dnsquery: %r");
-
+
for(t0=t; t; t=t->entry){
print("%s=%q ", t->attr, t->val);
if(t->line == t0){
@@ -32,4 +32,3 @@ main(int argc, char **argv)
}
exits(0);
}
-