]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_12_0_patch] mem.c failed to compile if ISC_MEM_CHECKOVERRUN=0
authorEvan Hunt <each@isc.org>
Fri, 5 Jan 2018 01:56:43 +0000 (17:56 -0800)
committerEvan Hunt <each@isc.org>
Fri, 5 Jan 2018 01:56:43 +0000 (17:56 -0800)
(cherry picked from commit 4c33e133ca7eb0aa65986f0ea5d788007e70aaa9)
(cherry picked from commit 879e17b77df92171c9ef4a54f60b7436e7a854fa)

lib/isc/mem.c

index e14e4597a1f6c13a0841982a44ce54997054e16b..f88de86e7aae0ff31ab6d1ac477f55b413c90ba5 100644 (file)
@@ -774,8 +774,9 @@ mem_get(isc__mem_t *ctx, size_t size) {
        if (ISC_UNLIKELY((ctx->flags & ISC_MEMFLAG_FILL) != 0)) {
                if (ISC_LIKELY(ret != NULL))
                        memset(ret, 0xbe, size); /* Mnemonic for "beef". */
-       } else {
+       }
 #if ISC_MEM_CHECKOVERRUN
+       else {
                if (ISC_LIKELY(ret != NULL))
                        ret[size-1] = 0xbe;
        }