T *ptr;
expression n;
@@
-- memset(ptr, \( 0x0 \| 0 \), n * \( sizeof(T)
-- \| sizeof(*ptr)
-- \) )
+- memset(ptr, \( 0 \| '\0' \), \( (n) \| n \) * \( sizeof(T)
+- \| sizeof(ptr[...])
+- \| sizeof(*ptr)
+- \) )
++ MEMZERO_ARRAY(ptr, n)
+
+@@
+type T;
+T *ptr;
+expression n;
+@@
+- memset(ptr, \( 0 \| '\0' \), \( sizeof(T)
+- \| sizeof(ptr[...])
+- \| sizeof(*ptr)
+- \) * \( (n) \| n \) )
++ MEMZERO_ARRAY(ptr, n)
+
+@@
+type T;
+T[] ptr;
+expression n;
+@@
+- memset(ptr, \( 0 \| '\0' \), \( (n) \| n \) * \( sizeof(T)
+- \| sizeof(ptr[...])
+- \| sizeof(*ptr)
+- \) )
+ MEMZERO_ARRAY(ptr, n)
@@
T[] ptr;
expression n;
@@
-- memset(ptr, \( 0x0 \| 0 \), n * \( sizeof(T)
-- \| sizeof(*ptr)
-- \) )
+- memset(ptr, \( 0 \| '\0' \), \( sizeof(T)
+- \| sizeof(ptr[...])
+- \| sizeof(*ptr)
+- \) * \( (n) \| n \) )
+ MEMZERO_ARRAY(ptr, n)
st_mult(sizeof(struct spanhash), (size_t)1 << i)));
hash->alloc_log2 = i;
hash->free = INITIAL_FREE(i);
- MEMZERO_ARRAY(hash->data, ((size_t)1 << i));
+ MEMZERO_ARRAY(hash->data, (size_t)1 << i);
n = 0;
accum1 = accum2 = 0;
{
size_t old_size = self->word_alloc;
ALLOC_GROW(self->words, word_alloc, self->word_alloc);
- MEMZERO_ARRAY(self->words + old_size, (self->word_alloc - old_size));
+ MEMZERO_ARRAY(self->words + old_size, self->word_alloc - old_size);
}
void bitmap_set(struct bitmap *self, size_t pos)
self->word_alloc = other_final;
REALLOC_ARRAY(self->words, self->word_alloc);
MEMZERO_ARRAY(self->words + original_size,
- (self->word_alloc - original_size));
+ self->word_alloc - original_size);
}
ewah_iterator_init(&it, other);