Commit 26c0eaf6 authored by Mark Andrews's avatar Mark Andrews

Merge branch '877-clang-scan-build-redundant-assignments-detected-2' into 'master'

Add missing asserts to socket_test.c and dnstest.c

See merge request !1523
parents ee6a378f 76a1c153
Pipeline #10135 passed with stages
in 14 minutes and 29 seconds
...@@ -551,6 +551,7 @@ dns_test_namefromstring(const char *namestr, dns_fixedname_t *fname) { ...@@ -551,6 +551,7 @@ dns_test_namefromstring(const char *namestr, dns_fixedname_t *fname) {
name = dns_fixedname_initname(fname); name = dns_fixedname_initname(fname);
result = isc_buffer_allocate(mctx, &b, length); result = isc_buffer_allocate(mctx, &b, length);
assert_int_equal(result, ISC_R_SUCCESS);
isc_buffer_putmem(b, (const unsigned char *) namestr, length); isc_buffer_putmem(b, (const unsigned char *) namestr, length);
result = dns_name_fromtext(name, b, dns_rootname, 0, NULL); result = dns_name_fromtext(name, b, dns_rootname, 0, NULL);
......
...@@ -817,6 +817,7 @@ udp_trunc_test(void **state) { ...@@ -817,6 +817,7 @@ udp_trunc_test(void **state) {
completion_init(&completion); completion_init(&completion);
recv_trunc = false; recv_trunc = false;
result = isc_socket_recv(s2, &r, 1, task, event_done, &completion); result = isc_socket_recv(s2, &r, 1, task, event_done, &completion);
assert_int_equal(result, ISC_R_SUCCESS);
waitfor(&completion); waitfor(&completion);
assert_true(completion.done); assert_true(completion.done);
assert_int_equal(completion.result, ISC_R_SUCCESS); assert_int_equal(completion.result, ISC_R_SUCCESS);
......
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