Moved variable declaration to the start of the function block

This commit is contained in:
Adam Dunkels 2013-11-20 15:14:11 +01:00
parent faff1c2a7e
commit b0460317b8
2 changed files with 2 additions and 2 deletions

View file

@ -69,6 +69,7 @@ rpl_verify_header(int uip_ext_opt_offset)
rpl_instance_t *instance;
int down;
uint8_t sender_closer;
uip_ds6_route_t *route;
if(UIP_EXT_HDR_OPT_RPL_BUF->opt_len != RPL_HDR_OPT_LEN) {
PRINTF("RPL: Bad header option! (wrong length)\n");
@ -88,7 +89,6 @@ rpl_verify_header(int uip_ext_opt_offset)
the packet to be forwareded in the first place. We drop any
routes that go through the neighbor that sent the packet to
us. */
uip_ds6_route_t *route;
route = uip_ds6_route_lookup(&UIP_IP_BUF->destipaddr);
if(route != NULL) {
uip_ds6_route_rm(route);

View file

@ -579,6 +579,7 @@ dao_input(void)
int i;
int learned_from;
rpl_parent_t *p;
uip_ds6_nbr_t *nbr;
prefixlen = 0;
@ -716,7 +717,6 @@ dao_input(void)
PRINTF("RPL: adding DAO route\n");
uip_ds6_nbr_t *nbr;
if((nbr = uip_ds6_nbr_lookup(&dao_sender_addr)) == NULL) {
if((nbr = uip_ds6_nbr_add(&dao_sender_addr,
(uip_lladdr_t *)packetbuf_addr(PACKETBUF_ADDR_SENDER),