summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@engin.umich.edu>1997-04-16 19:42:41 -0400
committerChip Salzenberg <chip@atlantic.net>1997-04-17 00:00:00 +0000
commit0b7c1c42da332bb339b450310a2999f9899ceb11 (patch)
tree124be3d01fb0f14bf507b371678b495136b89378 /util.c
parentac91690fe10ac7691f6f40c5d55578b8254e3705 (diff)
downloadperl-0b7c1c42da332bb339b450310a2999f9899ceb11.tar.gz
Fix use of var before init in util.c
I thought I sent this a few sub-subversions ago, but it seems to be missing in 3_97e. p5p-msgid: 199704162342.TAA20773@aatma.engin.umich.edu
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index cdb64ad3eb..fbed244a14 100644
--- a/util.c
+++ b/util.c
@@ -185,13 +185,13 @@ MEM_SIZE size;
if ((long)size < 0 || (long)count < 0)
croak("panic: calloc");
#endif
+ size *= count;
+ ptr = malloc(size?size:1); /* malloc(0) is NASTY on our system */
#if !(defined(I286) || defined(atarist))
DEBUG_m(PerlIO_printf(PerlIO_stderr(), "0x%x: (%05d) calloc %ld x %ld bytes\n",ptr,an++,(long)count,(long)size));
#else
DEBUG_m(PerlIO_printf(PerlIO_stderr(), "0x%lx: (%05d) calloc %ld x %ld bytes\n",ptr,an++,(long)count,(long)size));
#endif
- size *= count;
- ptr = malloc(size?size:1); /* malloc(0) is NASTY on our system */
if (ptr != Nullch) {
memset((void*)ptr, 0, size);
return ptr;