Commit 2156a5b6 authored by Mark Andrews's avatar Mark Andrews
Browse files

address coverity side effect in assert warning

parent e9d999f6
Pipeline #7151 passed with stages
in 20 minutes and 38 seconds
...@@ -606,7 +606,6 @@ getlabel_test(void **state) { ...@@ -606,7 +606,6 @@ getlabel_test(void **state) {
dns_fixedname_t f1, f2; dns_fixedname_t f1, f2;
dns_name_t *n1, *n2; dns_name_t *n1, *n2;
dns_label_t l1, l2; dns_label_t l1, l2;
unsigned char *p1, *p2;
unsigned int j; unsigned int j;
n1 = dns_fixedname_initname(&f1); n1 = dns_fixedname_initname(&f1);
...@@ -623,10 +622,8 @@ getlabel_test(void **state) { ...@@ -623,10 +622,8 @@ getlabel_test(void **state) {
dns_name_getlabel(n2, testcases[i].pos2, &l2); dns_name_getlabel(n2, testcases[i].pos2, &l2);
assert_int_equal(l1.length, l2.length); assert_int_equal(l1.length, l2.length);
p1 = l1.base;
p2 = l2.base;
for (j = 0; j < l1.length; j++) { for (j = 0; j < l1.length; j++) {
assert_int_equal(*p1++, *p2++); assert_int_equal(l1.base[j], l2.base[j]);
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment