Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
There's no point in clearing mem in _xbt_dynar_expand.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 23 Nov 2011 12:51:27 +0000 (13:51 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 28 Nov 2011 10:21:32 +0000 (11:21 +0100)
It's already done in _xbt_dynar_set_at_ptr.

src/xbt/dynar.c

index 3eee73d..2c435f5 100644 (file)
@@ -97,8 +97,6 @@ static XBT_INLINE
 
     XBT_DEBUG("expand %p from %lu to %lu elements", dynar, old_size, new_size);
 
 
     XBT_DEBUG("expand %p from %lu to %lu elements", dynar, old_size, new_size);
 
-    _xbt_clear_mem((char *)new_data + old_length, new_length - old_length);
-
     dynar->size = new_size;
     dynar->data = new_data;
   }
     dynar->size = new_size;
     dynar->data = new_data;
   }