]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
isc_mempool_create cannot fail, change the return type to void
authorOndřej Surý <ondrej@isc.org>
Sun, 2 Feb 2020 07:39:45 +0000 (08:39 +0100)
committerOndřej Surý <ondrej@isc.org>
Sun, 2 Feb 2020 07:39:45 +0000 (08:39 +0100)
lib/isc/include/isc/mem.h
lib/isc/mem.c

index 7d7aecef78320260df68b4178a930eb5d9cab0eb..6c73e966898fafd5a9f38364b506e97f08837490 100644 (file)
@@ -451,7 +451,7 @@ isc_mem_renderjson(void *memobj0);
  * Memory pools
  */
 
-isc_result_t
+void
 isc_mempool_create(isc_mem_t *mctx, size_t size, isc_mempool_t **mpctxp);
 /*%<
  * Create a memory pool.
index d47189103338d18a4fa3dfa30ce30ed72e684fc3..9e0887782fe49b077c207fb2147499d6e7b604be 100644 (file)
@@ -1535,7 +1535,7 @@ isc_mem_gettag(isc_mem_t *ctx0) {
  * Memory pool stuff
  */
 
-isc_result_t
+void
 isc_mempool_create(isc_mem_t *mctx0, size_t size, isc_mempool_t **mpctxp) {
        isc__mem_t *mctx = (isc__mem_t *)mctx0;
        isc__mempool_t *mpctx;
@@ -1579,8 +1579,6 @@ isc_mempool_create(isc_mem_t *mctx0, size_t size, isc_mempool_t **mpctxp) {
        ISC_LIST_INITANDAPPEND(mctx->pools, mpctx, link);
        mctx->poolcnt++;
        MCTXUNLOCK(mctx);
-
-       return (ISC_R_SUCCESS);
 }
 
 void