On Linux, don't compile with -DTHREADS_HAVE_PIDS if the
[p5sagit/p5-mst-13.2.git] / util.c
diff --git a/util.c b/util.c
index edd51b5..7478c39 100644 (file)
--- a/util.c
+++ b/util.c
@@ -258,7 +258,7 @@ Perl_safesyscalloc(MEM_SIZE count, MEM_SIZE size)
 {
     dTHX;
     Malloc_t ptr;
-#ifdef DEBUGGING
+#if defined(DEBUGGING) || defined(HAS_64K_LIMIT) || defined(PERL_TRACK_MEMPOOL)
     const MEM_SIZE total_size = size * count
 #ifdef   PERL_TRACK_MEMPOOL
        + sTHX
@@ -421,13 +421,13 @@ Perl_ninstr(pTHX_ const char *big, const char *bigend, const char *little, const
         bigend -= lend - little;
     OUTER:
         while (big <= bigend) {
-            if (*big++ != first)
-                goto OUTER;
-            for (x=big,s=little; s < lend; x++,s++) {
-                if (*s != *x)
-                    goto OUTER;
+            if (*big++ == first) {
+                for (x=big,s=little; s < lend; x++,s++) {
+                    if (*s != *x)
+                        goto OUTER;
+                }
+                return (char*)(big-1);
             }
-            return (char*)(big-1);
         }
     }
     return NULL;