This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use PL_op_desc rather than literal strings in pp_ioctl
[perl5.git] / malloc.c
index 521248a..a331550 100644 (file)
--- a/malloc.c
+++ b/malloc.c
@@ -1159,14 +1159,13 @@ perl_get_emergency_buffer(IV *size)
     GV **gvp = (GV**)hv_fetch(PL_defstash, "^M", 2, 0);
     SV *sv;
     char *pv;
-    STRLEN n_a;
 
     if (!gvp) gvp = (GV**)hv_fetch(PL_defstash, "\015", 1, 0);
     if (!gvp || !(sv = GvSV(*gvp)) || !SvPOK(sv) 
         || (SvLEN(sv) < (1<<LOG_OF_MIN_ARENA) - M_OVERHEAD))
         return NULL;           /* Now die die die... */
     /* Got it, now detach SvPV: */
-    pv = SvPV(sv, n_a);
+    pv = SvPV_nolen(sv);
     /* Check alignment: */
     if ((PTR2UV(pv) - sizeof(union overhead)) & (NEEDED_ALIGNMENT - 1)) {
         PerlIO_puts(PerlIO_stderr(),"Bad alignment of $^M!\n");
@@ -2355,7 +2354,7 @@ Perl_putenv(char *a)
 MEM_SIZE
 Perl_malloced_size(void *p)
 {
-    union overhead *ovp = (union overhead *)
+    union overhead * const ovp = (union overhead *)
        ((caddr_t)p - sizeof (union overhead) * CHUNK_SHIFT);
     const int bucket = OV_INDEX(ovp);
 #ifdef RCHECK