Code style

This commit is contained in:
Simon Duquennoy 2016-06-08 14:05:37 +02:00
parent 0f5e3413fa
commit d5e74b9579
2 changed files with 10 additions and 8 deletions

View File

@ -65,7 +65,7 @@ MEMB(nodememb, rpl_ns_node_t, RPL_NS_LINK_NUM);
/*---------------------------------------------------------------------------*/
int
rpl_ns_num_nodes()
rpl_ns_num_nodes(void)
{
return num_nodes;
}
@ -154,19 +154,21 @@ rpl_ns_update_node(rpl_dag_t *dag, const uip_ipaddr_t *child, const uip_ipaddr_t
}
/*---------------------------------------------------------------------------*/
void
rpl_ns_init()
rpl_ns_init(void)
{
num_nodes = 0;
memb_init(&nodememb);
list_init(nodelist);
}
/*---------------------------------------------------------------------------*/
rpl_ns_node_t *rpl_ns_node_head()
rpl_ns_node_t *
rpl_ns_node_head(void)
{
return list_head(nodelist);
}
/*---------------------------------------------------------------------------*/
rpl_ns_node_t *rpl_ns_node_next(rpl_ns_node_t *item)
rpl_ns_node_t *
rpl_ns_node_next(rpl_ns_node_t *item)
{
return list_item_next(item);
}
@ -181,7 +183,7 @@ rpl_ns_get_node_global_addr(uip_ipaddr_t *addr, rpl_ns_node_t *node)
}
/*---------------------------------------------------------------------------*/
void
rpl_ns_periodic()
rpl_ns_periodic(void)
{
rpl_ns_node_t *l;
/* First pass, decrement lifetime for all nodes with non-infinite lifetime */

View File

@ -58,11 +58,11 @@ typedef struct rpl_ns_node {
struct rpl_ns_node *parent;
} rpl_ns_node_t;
int rpl_ns_num_nodes();
int rpl_ns_num_nodes(void);
void rpl_ns_expire_parent(rpl_dag_t *dag, const uip_ipaddr_t *child, const uip_ipaddr_t *parent);
rpl_ns_node_t *rpl_ns_update_node(rpl_dag_t *dag, const uip_ipaddr_t *child, const uip_ipaddr_t *parent, uint32_t lifetime);
void rpl_ns_init();
rpl_ns_node_t *rpl_ns_node_head();
void rpl_ns_init(void);
rpl_ns_node_t *rpl_ns_node_head(void);
rpl_ns_node_t *rpl_ns_node_next(rpl_ns_node_t *item);
rpl_ns_node_t *rpl_ns_get_node(const rpl_dag_t *dag, const uip_ipaddr_t *addr);
int rpl_ns_is_node_reachable(const rpl_dag_t *dag, const uip_ipaddr_t *addr);