summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
Diffstat (limited to 'networking')
-rw-r--r--networking/dnsd.c4
-rw-r--r--networking/fakeidentd.c98
-rw-r--r--networking/httpd.c4
-rw-r--r--networking/interface.c2
-rw-r--r--networking/libiproute/iproute.c2
-rw-r--r--networking/libiproute/ll_map.c2
-rw-r--r--networking/nslookup.c6
-rw-r--r--networking/ping6.c2
-rw-r--r--networking/telnetd.c2
9 files changed, 61 insertions, 61 deletions
diff --git a/networking/dnsd.c b/networking/dnsd.c
index 6f1ec0e..1fb9ccf 100644
--- a/networking/dnsd.c
+++ b/networking/dnsd.c
@@ -230,7 +230,7 @@ static int table_lookup(uint16_t type, uint8_t * as, uint8_t * qs)
char *p,*q;
q = (char *)&(qs[1]);
p = &(d->name[1]);
- fprintf(stderr, "\n%s: %d/%d p:%s q:%s %d",
+ fprintf(stderr, "\n%s: %d/%d p:%s q:%s %d",
__FUNCTION__, strlen(p), (int)(d->name[0]), p, q, strlen(q));
#endif
if (type == REQ_A) { /* search by host name */
@@ -247,7 +247,7 @@ static int table_lookup(uint16_t type, uint8_t * as, uint8_t * qs)
#endif
return 0;
}
- } else
+ } else
if (type == REQ_PTR) { /* search by IP-address */
if (!strncmp((char*)&d->rip[1], (char*)&qs[1], strlen(d->rip)-1)) {
strcpy((char *)as, d->name);
diff --git a/networking/fakeidentd.c b/networking/fakeidentd.c
index 8967a7a..7eac480 100644
--- a/networking/fakeidentd.c
+++ b/networking/fakeidentd.c
@@ -240,68 +240,68 @@ int fakeidentd_main(int argc, char **argv)
/* main loop where we process all events and never exit */
while (1) {
- fd_set rfds = G.readfds;
- struct timeval tv = { 15, 0 };
- int i;
- int tim = time(NULL);
-
- select(G.conncnt + FCS, &rfds, NULL, NULL, G.conncnt? &tv: NULL);
-
- for (i = G.conncnt - 1; i >= 0; i--) {
- int s = i + FCS;
-
- if (FD_ISSET(s, &rfds)) {
- char *buf = conns[i].buf;
- unsigned int len = conns[i].len;
- unsigned int l;
-
- if ((l = read(s, buf + len, sizeof(conns[0].buf) - len)) > 0) {
- if (checkInput(buf, len, l)) {
- reply(s, buf);
- goto deleteconn;
- } else if (len + l >= sizeof(conns[0].buf)) {
- replyError(s, "X-INVALID-REQUEST");
- goto deleteconn;
+ fd_set rfds = G.readfds;
+ struct timeval tv = { 15, 0 };
+ int i;
+ int tim = time(NULL);
+
+ select(G.conncnt + FCS, &rfds, NULL, NULL, G.conncnt? &tv: NULL);
+
+ for (i = G.conncnt - 1; i >= 0; i--) {
+ int s = i + FCS;
+
+ if (FD_ISSET(s, &rfds)) {
+ char *buf = conns[i].buf;
+ unsigned int len = conns[i].len;
+ unsigned int l;
+
+ if ((l = read(s, buf + len, sizeof(conns[0].buf) - len)) > 0) {
+ if (checkInput(buf, len, l)) {
+ reply(s, buf);
+ goto deleteconn;
+ } else if (len + l >= sizeof(conns[0].buf)) {
+ replyError(s, "X-INVALID-REQUEST");
+ goto deleteconn;
+ } else {
+ conns[i].len += l;
+ }
} else {
- conns[i].len += l;
+ goto deleteconn;
}
- } else {
- goto deleteconn;
- }
- conns[i].lasttime = tim;
- continue;
+ conns[i].lasttime = tim;
+ continue;
deleteconn:
- deleteConn(s);
- } else {
- /* implement as time_after() in linux kernel sources ... */
- if (conns[i].lasttime + MAXIDLETIME <= tim) {
- replyError(s, "X-TIMEOUT");
deleteConn(s);
+ } else {
+ /* implement as time_after() in linux kernel sources ... */
+ if (conns[i].lasttime + MAXIDLETIME <= tim) {
+ replyError(s, "X-TIMEOUT");
+ deleteConn(s);
+ }
}
}
- }
- if (FD_ISSET(0, &rfds)) {
- int s = accept(0, NULL, 0);
+ if (FD_ISSET(0, &rfds)) {
+ int s = accept(0, NULL, 0);
- if (s < 0) {
- if (errno != EINTR) /* EINTR */
- bb_perror_msg("accept");
- } else {
- if (G.conncnt == MAXCONNS)
- i = closeOldest();
- else
- i = G.conncnt++;
+ if (s < 0) {
+ if (errno != EINTR) /* EINTR */
+ bb_perror_msg("accept");
+ } else {
+ if (G.conncnt == MAXCONNS)
+ i = closeOldest();
+ else
+ i = G.conncnt++;
- movefd(s, i + FCS); /* move if not already there */
- FD_SET(i + FCS, &G.readfds);
+ movefd(s, i + FCS); /* move if not already there */
+ FD_SET(i + FCS, &G.readfds);
- conns[i].len = 0;
- conns[i].lasttime = time(NULL);
+ conns[i].len = 0;
+ conns[i].lasttime = time(NULL);
+ }
}
- }
} /* end of while (1) */
return 0;
diff --git a/networking/httpd.c b/networking/httpd.c
index da33146..818590f 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -715,7 +715,7 @@ static char *decodeString(char *orig, int option_d)
}
value1 = value1 * 16 + value2;
if (!option_d && (value1 == '/' || value1 == '\0')) {
- /* caller takes it as indication of invalid
+ /* caller takes it as indication of invalid
* (dangerous wrt exploits) chars */
return orig + 1;
}
@@ -998,7 +998,7 @@ static int sendCgi(const char *url,
pid = fork();
if (pid < 0)
return 0;
-
+
if (!pid) {
/* child process */
char *script;
diff --git a/networking/interface.c b/networking/interface.c
index 6d23e9b..d470592 100644
--- a/networking/interface.c
+++ b/networking/interface.c
@@ -116,7 +116,7 @@ static int INET_getsock(char *bufp, struct sockaddr *sap)
sock_in = (struct sockaddr_in *) sap;
sock_in->sin_family = AF_INET;
sock_in->sin_port = 0;
-
+
val = 0;
bp = (char *) &val;
for (i = 0; i < sizeof(sock_in->sin_addr.s_addr); i++) {
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index 2ff9957..c4c3fc2 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -562,7 +562,7 @@ static int iproute_list_or_flush(int argc, char **argv, int flush)
if (matches(*argv, "cache") == 0) {
filter.tb = -1;
#if 0 && ENABLE_FEATURE_IP_RULE
-
+
#else
} else if (matches(*argv, "main") != 0) {
invarg(*argv, "table");
diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c
index a14fa4e..f429763 100644
--- a/networking/libiproute/ll_map.c
+++ b/networking/libiproute/ll_map.c
@@ -169,7 +169,7 @@ int ll_name_to_index(char *name)
* to the reader... Jean II */
return ifr.ifr_ifindex;
}
-
+
return 0;
}
diff --git a/networking/nslookup.c b/networking/nslookup.c
index cc5ff95..4beecc6 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -23,7 +23,7 @@
* $ nslookup yahoo.com
* Server: 128.193.0.10
* Address: 128.193.0.10#53
- *
+ *
* Non-authoritative answer:
* Name: yahoo.com
* Address: 216.109.112.135
@@ -33,11 +33,11 @@
* $ nslookup 204.152.191.37
* Server: 128.193.4.20
* Address: 128.193.4.20#53
- *
+ *
* Non-authoritative answer:
* 37.191.152.204.in-addr.arpa canonical name = 37.32-27.191.152.204.in-addr.arpa.
* 37.32-27.191.152.204.in-addr.arpa name = zeus-pub2.kernel.org.
- *
+ *
* Authoritative answers can be found from:
* 32-27.191.152.204.in-addr.arpa nameserver = ns1.kernel.org.
* 32-27.191.152.204.in-addr.arpa nameserver = ns2.kernel.org.
diff --git a/networking/ping6.c b/networking/ping6.c
index fd18cc8..5cb02f5 100644
--- a/networking/ping6.c
+++ b/networking/ping6.c
@@ -420,7 +420,7 @@ int ping6_main(int argc, char **argv)
datalen = DEFDATALEN; /* initialized here rather than in global scope to work around gcc bug */
/* exactly one argument needed, -v and -q don't mix */
- opt_complementary = "=1:q--v:v--q";
+ opt_complementary = "=1:q--v:v--q";
getopt32(argc, argv, OPT_STRING, &opt_c, &opt_s, &opt_I);
if (option_mask32 & 4) pingcount = xatoul(opt_c); // -c
if (option_mask32 & 8) datalen = xatou16(opt_s); // -s
diff --git a/networking/telnetd.c b/networking/telnetd.c
index a0ee2c3..dd5d55d 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -286,7 +286,7 @@ make_new_session(
ts->shell_pid = pid;
return ts;
}
-
+
/* child */
/* open the child's side of the tty. */