tests/fib: Tidy up code style and fix cppcheck warning

This commit is contained in:
Joakim Nohlgård 2016-10-06 14:42:51 +02:00
parent 7c48c891a0
commit 4e5fae77da

View File

@ -709,7 +709,7 @@ static void test_fib_16_prefix_match(void)
*/
static void test_fib_17_get_entry_set(void)
{
size_t addr_buf_size = 16;
static const size_t addr_buf_size = 16;
char addr_dst[addr_buf_size];
char addr_nxt[addr_buf_size];
@ -742,8 +742,7 @@ static void test_fib_17_get_entry_set(void)
arr_size = 20;
memset(prefix,0, addr_buf_size);
/* cppcheck: prefix is set to all 0 before adding an address
*/
/* cppcheck: prefix is set to all 0 before adding an address */
/* cppcheck-suppress redundantCopy */
snprintf(prefix, addr_buf_size, "Test address 0");
@ -757,6 +756,8 @@ static void test_fib_17_get_entry_set(void)
arr_size = 20;
memset(prefix, 0, addr_buf_size);
/* cppcheck: prefix is set to all 0 before adding an address */
/* cppcheck-suppress redundantCopy */
snprintf(prefix, addr_buf_size, "Test address");
ret = fib_get_destination_set(&test_fib_table,