Commit 916fc9e5 authored by Matthieu Boutier's avatar Matthieu Boutier Committed by Juliusz Chroboczek

Remove tab characters.

parent 0b778cc6
...@@ -88,7 +88,7 @@ read_random_bytes(void *buf, size_t len) ...@@ -88,7 +88,7 @@ read_random_bytes(void *buf, size_t len)
fd = open("/dev/urandom", O_RDONLY); fd = open("/dev/urandom", O_RDONLY);
if(fd < 0) { if(fd < 0) {
rc = -1; rc = -1;
} else { } else {
rc = read(fd, buf, len); rc = read(fd, buf, len);
if(rc < 0 || (unsigned)rc < len) if(rc < 0 || (unsigned)rc < len)
......
...@@ -138,7 +138,7 @@ fail: ...@@ -138,7 +138,7 @@ fail:
} }
/* KAME said : "Following two macros are highly depending on KAME Release" */ /* KAME said : "Following two macros are highly depending on KAME Release" */
#define IN6_LINKLOCAL_IFINDEX(a) ((a).s6_addr[2] << 8 | (a).s6_addr[3]) #define IN6_LINKLOCAL_IFINDEX(a) ((a).s6_addr[2] << 8 | (a).s6_addr[3])
#define SET_IN6_LINKLOCAL_IFINDEX(a, i) \ #define SET_IN6_LINKLOCAL_IFINDEX(a, i) \
do { \ do { \
(a).s6_addr[2] = ((i) >> 8) & 0xff; \ (a).s6_addr[2] = ((i) >> 8) & 0xff; \
...@@ -171,7 +171,7 @@ mask2len(const unsigned char *p, const int size) ...@@ -171,7 +171,7 @@ mask2len(const unsigned char *p, const int size)
} }
if(j < size) { if(j < size) {
switch(*p) { switch(*p) {
#define MASKLEN(m, l) case m: do { i += l; break; } while (0) #define MASKLEN(m, l) case m: do { i += l; break; } while (0)
MASKLEN(0xfe, 7); break; MASKLEN(0xfe, 7); break;
MASKLEN(0xfc, 6); break; MASKLEN(0xfc, 6); break;
MASKLEN(0xf8, 5); break; MASKLEN(0xf8, 5); break;
...@@ -179,7 +179,7 @@ mask2len(const unsigned char *p, const int size) ...@@ -179,7 +179,7 @@ mask2len(const unsigned char *p, const int size)
MASKLEN(0xe0, 3); break; MASKLEN(0xe0, 3); break;
MASKLEN(0xc0, 2); break; MASKLEN(0xc0, 2); break;
MASKLEN(0x80, 1); break; MASKLEN(0x80, 1); break;
#undef MASKLEN #undef MASKLEN
} }
} }
return i; return i;
...@@ -674,7 +674,7 @@ kernel_routes(struct kernel_route *routes, int maxroutes) ...@@ -674,7 +674,7 @@ kernel_routes(struct kernel_route *routes, int maxroutes)
mib[2] = 0; mib[2] = 0;
mib[3] = AF_UNSPEC; /* Address family */ mib[3] = AF_UNSPEC; /* Address family */
mib[4] = NET_RT_DUMP; /* Dump the kernel routing table */ mib[4] = NET_RT_DUMP; /* Dump the kernel routing table */
mib[5] = 0; /* No flags */ mib[5] = 0; /* No flags */
rc = sysctl(mib, 6, NULL, &len, NULL, 0); rc = sysctl(mib, 6, NULL, &len, NULL, 0);
if (rc < 0) { if (rc < 0) {
......
...@@ -619,7 +619,7 @@ parse_packet(const unsigned char *from, struct interface *ifp, ...@@ -619,7 +619,7 @@ parse_packet(const unsigned char *from, struct interface *ifp,
if (valid_rtt(neigh)) { if (valid_rtt(neigh)) {
/* Running exponential average. */ /* Running exponential average. */
smoothed_rtt = (ifp->rtt_decay * rtt + smoothed_rtt = (ifp->rtt_decay * rtt +
(256 - ifp->rtt_decay) * neigh->rtt); (256 - ifp->rtt_decay) * neigh->rtt);
/* Rounding (up or down) to get closer to the sample. */ /* Rounding (up or down) to get closer to the sample. */
neigh->rtt = (neigh->rtt >= rtt) ? smoothed_rtt / 256 : neigh->rtt = (neigh->rtt >= rtt) ? smoothed_rtt / 256 :
(smoothed_rtt + 255) / 256; (smoothed_rtt + 255) / 256;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment