Skip to content

Commit

Permalink
rpl: remove common globals by prefixing with static
Browse files Browse the repository at this point in the history
  • Loading branch information
cgundogan committed Feb 2, 2015
1 parent dd5fb64 commit f3c6ef7
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion sys/net/routing/rpl/of0.c
Expand Up @@ -27,7 +27,7 @@ static rpl_parent_t *which_parent(rpl_parent_t *, rpl_parent_t *);
static rpl_dodag_t *which_dodag(rpl_dodag_t *, rpl_dodag_t *);
static void reset(rpl_dodag_t *);

rpl_of_t rpl_of0 = {
static rpl_of_t rpl_of0 = {
0x0,
calc_rank,
which_parent,
Expand Down
6 changes: 3 additions & 3 deletions sys/net/routing/rpl/of_mrhof.c
Expand Up @@ -34,10 +34,10 @@ static rpl_dodag_t *which_dodag(rpl_dodag_t *, rpl_dodag_t *);
static void reset(rpl_dodag_t *);
static uint16_t calc_path_cost(rpl_parent_t *parent);

uint16_t cur_min_path_cost = MAX_PATH_COST;
rpl_parent_t *cur_preferred_parent = NULL;
static uint16_t cur_min_path_cost = MAX_PATH_COST;
static rpl_parent_t *cur_preferred_parent = NULL;

rpl_of_t rpl_of_mrhof = {
static rpl_of_t rpl_of_mrhof = {
0x1,
calc_rank,
which_parent,
Expand Down
14 changes: 7 additions & 7 deletions sys/net/routing/rpl/rpl.c
Expand Up @@ -62,18 +62,18 @@ static void _dao_handle_send(rpl_dodag_t *dodag);
static void _rpl_update_routing_table(void);

#if RPL_DEFAULT_MOP == RPL_NON_STORING_MODE
uint8_t srh_buffer[BUFFER_SIZE];
uint8_t srh_send_buffer[BUFFER_SIZE];
ipv6_addr_t *down_next_hop;
ipv6_srh_t *srh_header;
msg_t srh_m_send, srh_m_recv;
static uint8_t srh_buffer[BUFFER_SIZE];
static uint8_t srh_send_buffer[BUFFER_SIZE];
static ipv6_addr_t *down_next_hop;
static ipv6_srh_t *srh_header;
static msg_t srh_m_send, srh_m_recv;
#endif

#if RPL_MAX_ROUTING_ENTRIES != 0
rpl_routing_entry_t rpl_routing_table[RPL_MAX_ROUTING_ENTRIES];
static rpl_routing_entry_t rpl_routing_table[RPL_MAX_ROUTING_ENTRIES];
#endif
uint8_t rpl_max_routing_entries;
ipv6_addr_t my_address;
static ipv6_addr_t my_address;

/* IPv6 message buffer */
static ipv6_hdr_t *ipv6_buf;
Expand Down
6 changes: 3 additions & 3 deletions sys/net/routing/rpl/rpl_dodag.c
Expand Up @@ -31,9 +31,9 @@ char addr_str[IPV6_MAX_ADDR_STR_LEN];
#endif
#include "debug.h"

rpl_instance_t instances[RPL_MAX_INSTANCES];
rpl_dodag_t dodags[RPL_MAX_DODAGS];
rpl_parent_t parents[RPL_MAX_PARENTS];
static rpl_instance_t instances[RPL_MAX_INSTANCES];
static rpl_dodag_t dodags[RPL_MAX_DODAGS];
static rpl_parent_t parents[RPL_MAX_PARENTS];

void rpl_trickle_send_dio(void *args) {
(void) args;
Expand Down
2 changes: 1 addition & 1 deletion sys/net/routing/rpl/rpl_nonstoring/rpl_nonstoring.c
Expand Up @@ -27,7 +27,7 @@

#define ENABLE_DEBUG (0)
#if ENABLE_DEBUG
char addr_str_mode[IPV6_MAX_ADDR_STR_LEN];
static char addr_str_mode[IPV6_MAX_ADDR_STR_LEN];
#endif
#include "debug.h"

Expand Down
2 changes: 1 addition & 1 deletion sys/net/routing/rpl/rpl_of_manager.c
Expand Up @@ -29,7 +29,7 @@
#define ENABLE_DEBUG (0)
#include "debug.h"

rpl_of_t *objective_functions[NUMBER_IMPLEMENTED_OFS];
static rpl_of_t *objective_functions[NUMBER_IMPLEMENTED_OFS];

void rpl_of_manager_init(ipv6_addr_t *my_address)
{
Expand Down
2 changes: 1 addition & 1 deletion sys/net/routing/rpl/rpl_storing/rpl_storing.c
Expand Up @@ -28,7 +28,7 @@

#define ENABLE_DEBUG (0)
#if ENABLE_DEBUG
char addr_str_mode[IPV6_MAX_ADDR_STR_LEN];
static char addr_str_mode[IPV6_MAX_ADDR_STR_LEN];
#endif
#include "debug.h"

Expand Down

0 comments on commit f3c6ef7

Please sign in to comment.