Moved variable declaration to the start of the function block
This commit is contained in:
parent
faff1c2a7e
commit
b0460317b8
|
@ -69,6 +69,7 @@ rpl_verify_header(int uip_ext_opt_offset)
|
||||||
rpl_instance_t *instance;
|
rpl_instance_t *instance;
|
||||||
int down;
|
int down;
|
||||||
uint8_t sender_closer;
|
uint8_t sender_closer;
|
||||||
|
uip_ds6_route_t *route;
|
||||||
|
|
||||||
if(UIP_EXT_HDR_OPT_RPL_BUF->opt_len != RPL_HDR_OPT_LEN) {
|
if(UIP_EXT_HDR_OPT_RPL_BUF->opt_len != RPL_HDR_OPT_LEN) {
|
||||||
PRINTF("RPL: Bad header option! (wrong length)\n");
|
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
|
the packet to be forwareded in the first place. We drop any
|
||||||
routes that go through the neighbor that sent the packet to
|
routes that go through the neighbor that sent the packet to
|
||||||
us. */
|
us. */
|
||||||
uip_ds6_route_t *route;
|
|
||||||
route = uip_ds6_route_lookup(&UIP_IP_BUF->destipaddr);
|
route = uip_ds6_route_lookup(&UIP_IP_BUF->destipaddr);
|
||||||
if(route != NULL) {
|
if(route != NULL) {
|
||||||
uip_ds6_route_rm(route);
|
uip_ds6_route_rm(route);
|
||||||
|
|
|
@ -579,6 +579,7 @@ dao_input(void)
|
||||||
int i;
|
int i;
|
||||||
int learned_from;
|
int learned_from;
|
||||||
rpl_parent_t *p;
|
rpl_parent_t *p;
|
||||||
|
uip_ds6_nbr_t *nbr;
|
||||||
|
|
||||||
prefixlen = 0;
|
prefixlen = 0;
|
||||||
|
|
||||||
|
@ -716,7 +717,6 @@ dao_input(void)
|
||||||
|
|
||||||
PRINTF("RPL: adding DAO route\n");
|
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_lookup(&dao_sender_addr)) == NULL) {
|
||||||
if((nbr = uip_ds6_nbr_add(&dao_sender_addr,
|
if((nbr = uip_ds6_nbr_add(&dao_sender_addr,
|
||||||
(uip_lladdr_t *)packetbuf_addr(PACKETBUF_ADDR_SENDER),
|
(uip_lladdr_t *)packetbuf_addr(PACKETBUF_ADDR_SENDER),
|
||||||
|
|
Loading…
Reference in a new issue