Commit 6d99bd57 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Remove C99-isms.

parent 1ba29b3e
......@@ -843,12 +843,11 @@ main(int argc, char **argv)
static int
accept_local_connections(fd_set *readfds)
{
int rc;
int rc, s;
if(local_server_socket < 0 || !FD_ISSET(local_server_socket, readfds))
return 0;
int s;
s = accept(local_server_socket, NULL, NULL);
if(s < 0) {
......
......@@ -65,9 +65,10 @@ rt_cmp(const struct babel_route *rt1, const struct babel_route *rt2)
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;
int rc = rt_cmp(r1, r2);
rc = rt_cmp(r1, r2);
return rc <= 0 ? r1 : r2;
}
......
......@@ -1093,6 +1093,8 @@ parse_kernel_route_rta(struct rtmsg *rtm, int len, struct kernel_route *route)
{
int table = rtm->rtm_table;
struct rtattr *rta= RTM_RTA(rtm);;
int i;
len -= NLMSG_ALIGN(sizeof(*rtm));
memset(route, 0, sizeof(struct kernel_route));
......@@ -1147,10 +1149,10 @@ parse_kernel_route_rta(struct rtmsg *rtm, int len, struct kernel_route *route)
#undef COPY_ADDR
#undef GET_PLEN
int i;
for(i = 0; i < import_table_count; i++)
if(table == import_tables[i])
return 0;
return -1;
}
......
......@@ -117,7 +117,7 @@ enum prefix_status {
PST_DISJOINT = 1 << 0,
PST_EQUALS = 1 << 1,
PST_MORE_SPECIFIC = 1 << 2,
PST_LESS_SPECIFIC = 1 << 3,
PST_LESS_SPECIFIC = 1 << 3
};
enum prefix_status
prefix_cmp(const unsigned char *p1, unsigned char plen1,
......
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