diff options
author | Chris Hall <chris.hall@highwayman.com> | 2011-09-05 13:28:20 +0100 |
---|---|---|
committer | Chris Hall <chris.hall@highwayman.com> | 2011-09-05 13:28:20 +0100 |
commit | 2d480d4acf9bb0881a192f8ad181ca736fd0f4b2 (patch) | |
tree | 750e53d8447bb253c90b67687e0999f159e6ed36 /tests | |
parent | 1bc859b342e415a4c7de2956a6b5fd732923d9da (diff) | |
download | quagga-2d480d4acf9bb0881a192f8ad181ca736fd0f4b2.tar.bz2 quagga-2d480d4acf9bb0881a192f8ad181ca736fd0f4b2.tar.xz |
Work around issues with IPV6_MINHOPCOUNT -- -DNO_LINUX_IN6_H
On GNU_LINUX IPV6_MINHOPCOUNT is defined in linux/in6.h. Unfortunately,
that will not always compile due to clashes with netinet/in.h !! So,
as a work-around -DNO_LINUX_IN6_H disables the inclusion of
linux/in6.h -- which avoids the compilation issue, but turns off
IPV6_MINHOPCOUNT.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-symtab.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/test-symtab.c b/tests/test-symtab.c index a4b0bcf2..2076a2bd 100644 --- a/tests/test-symtab.c +++ b/tests/test-symtab.c @@ -50,6 +50,7 @@ test_symbol_table_init_new(void) symbol sym = NULL; symbol sym2 = NULL; void * old_value = NULL; + const void* get_name ; printf("test_symbol_table_init_new\n"); table = symbol_table_init_new(table, NULL, 0, 0, NULL, NULL); @@ -63,7 +64,8 @@ test_symbol_table_init_new(void) sym = symbol_lookup(table, name, add); symbol_set_value(sym, value); assert_true(sym != NULL, "sym == NULL"); - assert_true(strcmp(symbol_get_name(sym), name) == 0, + get_name = symbol_get_name(sym) ; + assert_true(strcmp(get_name, name) == 0, "strcmp(symbol_get_name(sym), name) != 0"); /* find */ @@ -98,11 +100,14 @@ test_symbol_table_lookup(void) /* add */ for (i = 0; i < len; ++i) { + const void* get_name ; + sprintf(buf, "%d-name", i); sym = symbol_lookup(table, buf, add); assert_true(sym != NULL, "add: sym == NULL"); - assert_true(strcmp(symbol_get_name(sym), buf) == 0, - "strcmp(symbol_get_name(sym), buf) != 0"); + get_name = symbol_get_name(sym) ; + assert_true(strcmp(get_name, buf) == 0, + "strcmp(symbol_get_name(sym), buf) != 0"); sprintf(buf, "%d-value", i); value = strdup(buf); @@ -114,11 +119,14 @@ test_symbol_table_lookup(void) /* find */ for (i = 0; i < len; ++i) { + const void* get_name ; + sprintf(buf, "%d-name", i); sym = symbol_lookup(table, buf, no_add); assert_true(sym != NULL, "find: sym == NULL"); - assert_true(strcmp(symbol_get_name(sym), buf) == 0, - "strcmp(symbol_get_name(sym), buf) != 0"); + get_name = symbol_get_name(sym) ; + assert_true(strcmp(get_name, buf) == 0, + "strcmp(symbol_get_name(sym), buf) != 0"); sprintf(buf, "%d-value", i); assert_true(strcmp(symbol_get_value(sym), buf) == 0, |