Commit 458e6da4 authored by Matthieu Boutier's avatar Matthieu Boutier Committed by Juliusz Chroboczek

Fix style.

parent eb921ff4
......@@ -67,8 +67,8 @@ static const struct babel_route *
min_route(const struct babel_route *r1, const struct babel_route *r2)
{
int rc;
if (!r1) return r2;
if (!r2) return r1;
if(!r1) return r2;
if(!r2) return r1;
rc = rt_cmp(r1, r2);
return rc <= 0 ? r1 : r2;
}
......@@ -112,14 +112,14 @@ inter(const struct babel_route *rt, const struct babel_route *rt1,
r1->src_prefix, r1->src_plen);
if(src_st == PST_DISJOINT)
return NULL;
if (dst_st == PST_MORE_SPECIFIC || dst_st == PST_EQUALS) {
if(dst_st == PST_MORE_SPECIFIC || dst_st == PST_EQUALS) {
zone->dst_prefix = r->prefix;
zone->dst_plen = r->plen;
} else {
zone->dst_prefix = r1->prefix;
zone->dst_plen = r1->plen;
}
if (src_st == PST_MORE_SPECIFIC || src_st == PST_EQUALS) {
if(src_st == PST_MORE_SPECIFIC || src_st == PST_EQUALS) {
zone->src_prefix = r->src_prefix;
zone->src_plen = r->src_plen;
} else {
......@@ -188,7 +188,7 @@ conflict_solution(const struct babel_route *rt)
while(1) {
rt2 = route_stream_next(stream2);
if (rt2 == NULL) break;
if(rt2 == NULL) break;
if(!(conflicts(rt1, rt2) &&
zone_equal(inter(rt1, rt2, &tmp), to_zone(rt, &zone)) &&
rt_cmp(rt1, rt2) < 0))
......
......@@ -118,12 +118,12 @@ kernel_older_than(const char *sysname, int version, int sub_version)
int v = 0;
int sub_v = 0;
rc = uname(&un);
if (rc < 0)
if(rc < 0)
return -1;
if (strcmp(sysname, un.sysname) != 0)
if(strcmp(sysname, un.sysname) != 0)
return -1;
rc = sscanf(un.release, "%d.%d", &v, &sub_v);
if (rc < 2)
if(rc < 2)
return -1;
return (v < version || (v == version && sub_v < sub_version));
}
......@@ -1772,7 +1772,7 @@ send_request(struct interface *ifp,
debugf("sending request to %s for %s from %s.\n", ifp->name,
format_prefix(prefix, plen),
format_prefix(src_prefix, src_plen));
} else if (prefix) {
} else if(prefix) {
debugf("sending request to %s for any specific.\n", ifp->name);
start_message(ifp, MESSAGE_REQUEST_SRC_SPECIFIC, 3);
accumulate_byte(ifp, 0);
......@@ -1780,7 +1780,7 @@ send_request(struct interface *ifp,
accumulate_byte(ifp, 0);
end_message(ifp, MESSAGE_REQUEST_SRC_SPECIFIC, 3);
return;
} else if (src_prefix) {
} else if(src_prefix) {
debugf("sending request to %s for any.\n", ifp->name);
start_message(ifp, MESSAGE_REQUEST, 2);
accumulate_byte(ifp, 0);
......@@ -1797,7 +1797,7 @@ send_request(struct interface *ifp,
pb = v4 ? ((plen - 96) + 7) / 8 : (plen + 7) / 8;
len = 2 + pb;
if (src_plen != 0) {
if(src_plen != 0) {
spb = v4 ? ((src_plen - 96) + 7) / 8 : (src_plen + 7) / 8;
len += spb + 1;
start_message(ifp, MESSAGE_REQUEST_SRC_SPECIFIC, len);
......@@ -1838,7 +1838,7 @@ send_unicast_request(struct neighbour *neigh,
format_address(neigh->address),
format_prefix(prefix, plen),
format_prefix(src_prefix, src_plen));
} else if (prefix) {
} else if(prefix) {
debugf("sending unicast request to %s for any specific.\n",
format_address(neigh->address));
rc = start_unicast_message(neigh, MESSAGE_REQUEST_SRC_SPECIFIC, 3);
......@@ -1848,7 +1848,7 @@ send_unicast_request(struct neighbour *neigh,
accumulate_unicast_byte(neigh, 0);
end_unicast_message(neigh, MESSAGE_REQUEST_SRC_SPECIFIC, 3);
return;
} else if (src_prefix) {
} else if(src_prefix) {
debugf("sending unicast request to %s for any.\n",
format_address(neigh->address));
rc = start_unicast_message(neigh, MESSAGE_REQUEST, 2);
......
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