Skip to content

Commit

Permalink
Remove tab characters.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Boutier authored and jech committed Jun 20, 2014
1 parent 0b778cc commit 916fc9e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kernel.c
Expand Up @@ -88,7 +88,7 @@ read_random_bytes(void *buf, size_t len)

fd = open("/dev/urandom", O_RDONLY);
if(fd < 0) {
rc = -1;
rc = -1;
} else {
rc = read(fd, buf, len);
if(rc < 0 || (unsigned)rc < len)
Expand Down
8 changes: 4 additions & 4 deletions kernel_socket.c
Expand Up @@ -138,7 +138,7 @@ get_sdl(struct sockaddr_dl *sdl, char *ifname)
}

/* 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) \
do { \
(a).s6_addr[2] = ((i) >> 8) & 0xff; \
Expand Down Expand Up @@ -171,15 +171,15 @@ mask2len(const unsigned char *p, const int size)
}
if(j < size) {
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(0xfc, 6); break;
MASKLEN(0xf8, 5); break;
MASKLEN(0xf0, 4); break;
MASKLEN(0xe0, 3); break;
MASKLEN(0xc0, 2); break;
MASKLEN(0x80, 1); break;
#undef MASKLEN
#undef MASKLEN
}
}
return i;
Expand Down Expand Up @@ -674,7 +674,7 @@ kernel_routes(struct kernel_route *routes, int maxroutes)
mib[2] = 0;
mib[3] = AF_UNSPEC; /* Address family */
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);
if (rc < 0) {
Expand Down
2 changes: 1 addition & 1 deletion message.c
Expand Up @@ -619,7 +619,7 @@ parse_packet(const unsigned char *from, struct interface *ifp,
if (valid_rtt(neigh)) {
/* Running exponential average. */
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. */
neigh->rtt = (neigh->rtt >= rtt) ? smoothed_rtt / 256 :
(smoothed_rtt + 255) / 256;
Expand Down

0 comments on commit 916fc9e

Please sign in to comment.