From: Gurusamy Sarathy Date: Mon, 21 Feb 2000 00:25:00 +0000 (+0000) Subject: misplaced braces X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2ba999ece4e8727143f109b401921cec33e5b6dc;p=p5sagit%2Fp5-mst-13.2.git misplaced braces p4raw-id: //depot/perl@5175 --- diff --git a/malloc.c b/malloc.c index d2041e5..9c6a6d8 100644 --- a/malloc.c +++ b/malloc.c @@ -1520,25 +1520,28 @@ Perl_mfree(void *mp) if (!bad_free_warn) return; #ifdef RCHECK +#ifdef PERL_CORE { dTHX; -#ifdef PERL_CORE if (!PERL_IS_ALIVE || !PL_curcop || ckWARN_d(WARN_MALLOC)) Perl_warner(aTHX_ WARN_MALLOC, "%s free() ignored", ovp->ov_rmagic == RMAGIC - 1 ? "Duplicate" : "Bad"); + } #else - warn("%s free() ignored", - ovp->ov_rmagic == RMAGIC - 1 ? "Duplicate" : "Bad"); + warn("%s free() ignored", + ovp->ov_rmagic == RMAGIC - 1 ? "Duplicate" : "Bad"); #endif #else #ifdef PERL_CORE + { + dTHX; if (!PERL_IS_ALIVE || !PL_curcop || ckWARN_d(WARN_MALLOC)) Perl_warner(aTHX_ WARN_MALLOC, "%s", "Bad free() ignored"); + } #else - warn("%s", "Bad free() ignored"); + warn("%s", "Bad free() ignored"); #endif - } #endif return; /* sanity */ } @@ -1617,28 +1620,31 @@ Perl_realloc(void *mp, size_t nbytes) if (!bad_free_warn) return Nullch; #ifdef RCHECK +#ifdef PERL_CORE { dTHX; -#ifdef PERL_CORE if (!PERL_IS_ALIVE || !PL_curcop || ckWARN_d(WARN_MALLOC)) Perl_warner(aTHX_ WARN_MALLOC, "%srealloc() %signored", (ovp->ov_rmagic == RMAGIC - 1 ? "" : "Bad "), ovp->ov_rmagic == RMAGIC - 1 ? "of freed memory " : ""); + } #else - warn("%srealloc() %signored", - (ovp->ov_rmagic == RMAGIC - 1 ? "" : "Bad "), - ovp->ov_rmagic == RMAGIC - 1 ? "of freed memory " : ""); + warn("%srealloc() %signored", + (ovp->ov_rmagic == RMAGIC - 1 ? "" : "Bad "), + ovp->ov_rmagic == RMAGIC - 1 ? "of freed memory " : ""); #endif #else #ifdef PERL_CORE + { + dTHX; if (!PERL_IS_ALIVE || !PL_curcop || ckWARN_d(WARN_MALLOC)) Perl_warner(aTHX_ WARN_MALLOC, "%s", "Bad realloc() ignored"); + } #else - warn("%s", "Bad realloc() ignored"); + warn("%s", "Bad realloc() ignored"); #endif - } #endif return Nullch; /* sanity */ }