Refactor the isc_buffer_allocate() usage using the semantic patch

The isc_buffer_allocate() function now cannot fail with ISC_R_MEMORY.
This commit removes all the checks on the return code using the semantic
patch from previous commit, as isc_buffer_allocate() now returns void.
This commit is contained in:
Ondřej Surý
2020-02-02 08:35:46 +01:00
parent d5f682a00b
commit c73e5866c4
41 changed files with 97 additions and 278 deletions

View File

@@ -571,8 +571,7 @@ dns_test_namefromstring(const char *namestr, dns_fixedname_t *fname) {
name = dns_fixedname_initname(fname);
result = isc_buffer_allocate(dt_mctx, &b, length);
assert_int_equal(result, ISC_R_SUCCESS);
isc_buffer_allocate(dt_mctx, &b, length);
isc_buffer_putmem(b, (const unsigned char *) namestr, length);
result = dns_name_fromtext(name, b, dns_rootname, 0, NULL);