Remove blocks checking whether isc_mem_get() failed using the coccinelle

This commit is contained in:
Ondřej Surý
2019-07-16 15:52:14 +02:00
parent f63e696967
commit ae83801e2b
133 changed files with 151 additions and 1717 deletions

View File

@@ -529,8 +529,6 @@ memory context is freed before all references have been cleaned up.
REQUIRE(foop != NULL && *foop == NULL);
foo = isc_mem_get(mctx, sizeof(isc_foo_t))
if (foo == NULL)
return (ISC_R_NOMEMORY);
/* Attach to memory context */
isc_mem_attach(mctx, &foo->mctx);
@@ -615,8 +613,6 @@ When creating an instance of this structure, initialize the link:
REQUIRE(foop != NULL && *foop == NULL);
foo = isc_mem_get(mctx, sizeof(isc_foo_t));
if (foo == NULL)
return (ISC_R_NOMEMORY);
ISC_LINK_INIT(foo, link);