Merge pull request #613 from g-oikonomou/bugfix/variable-definition

Move variable definition to start of function
This commit is contained in:
Joakim Eriksson 2018-08-10 21:23:07 +02:00 committed by GitHub
commit cde41c60ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -493,6 +493,7 @@ publish(void)
int len;
int remaining = APP_BUFFER_SIZE;
int i;
char def_rt_str[64];
seq_nr_value++;
@ -519,7 +520,6 @@ publish(void)
buf_ptr += len;
/* Put our Default route's string representation in a buffer */
char def_rt_str[64];
memset(def_rt_str, 0, sizeof(def_rt_str));
ipaddr_sprintf(def_rt_str, sizeof(def_rt_str), uip_ds6_defrt_choose());