[svn:parrot] r45313 - trunk/src

chromatic at svn.parrot.org chromatic at svn.parrot.org
Tue Mar 30 07:49:15 UTC 2010


Author: chromatic
Date: Tue Mar 30 07:49:15 2010
New Revision: 45313
URL: https://trac.parrot.org/parrot/changeset/45313

Log:
[hash] Avoided reinitializing callocated memory to NULL/0.

Modified:
   trunk/src/hash.c

Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c	Tue Mar 30 07:49:13 2010	(r45312)
+++ trunk/src/hash.c	Tue Mar 30 07:49:15 2010	(r45313)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -988,14 +988,9 @@
 
     for (i = 0, --bp; i < N_BUCKETS(INITIAL_BUCKETS); ++i, --bp) {
         bp->next        = hash->free_list;
-        bp->key         = NULL;
-        bp->value       = NULL;
         hash->free_list = bp;
     }
 
-    for (i = 0; i < INITIAL_BUCKETS; ++i)
-        hash->bi[i] = NULL;
-
     return hash;
 }
 


More information about the parrot-commits mailing list