This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deparse: Emit package before use
[perl5.git] / malloc.c
index 2ba76b1..51035fe 100644 (file)
--- a/malloc.c
+++ b/malloc.c
@@ -1056,8 +1056,7 @@ emergency_sbrk(MEM_SIZE size)
   do_croak:
     MALLOC_UNLOCK;
     emergency_sbrk_croak("Out of memory during request for %"UVuf" bytes, total sbrk() is %"UVuf" bytes", (UV)size, (UV)(goodsbrk + sbrk_slack));
-    /* NOTREACHED */
-    assert(0);
+    NOT_REACHED; /* NOTREACHED */
     return NULL;
 }
 
@@ -1825,7 +1824,7 @@ Perl_mfree(Malloc_t where)
                if (bad_free_warn == -1) {
                    dTHX;
                    char *pbf = PerlEnv_getenv("PERL_BADFREE");
-                   bad_free_warn = (pbf) ? atoi(pbf) : 1;
+                   bad_free_warn = (pbf) ? grok_atou(pbf, NULL) : 1;
                }
                if (!bad_free_warn)
                    return;
@@ -1923,7 +1922,7 @@ Perl_realloc(void *mp, size_t nbytes)
                if (bad_free_warn == -1) {
                    dTHX;
                    char *pbf = PerlEnv_getenv("PERL_BADFREE");
-                   bad_free_warn = (pbf) ? atoi(pbf) : 1;
+                   bad_free_warn = (pbf) ? grok_atou(pbf, NULL) : 1;
                }
                if (!bad_free_warn)
                    return NULL;