diff options
Diffstat (limited to '')
-rw-r--r-- | libsmartcols/src/grouping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libsmartcols/src/grouping.c b/libsmartcols/src/grouping.c index 0b27cb2..0f6fe78 100644 --- a/libsmartcols/src/grouping.c +++ b/libsmartcols/src/grouping.c @@ -278,7 +278,7 @@ static struct libscols_group **grpset_locate_freespace(struct libscols_table *tb DBG(TAB, ul_debugobj(tb, " realocate grpset [sz: old=%zu, new=%zu, new_chunks=%d]", tb->grpset_size, tb->grpset_size + wanted, chunks)); - tmp = realloc(tb->grpset, (tb->grpset_size + wanted) * sizeof(struct libscols_group *)); + tmp = reallocarray(tb->grpset, tb->grpset_size + wanted, sizeof(struct libscols_group *)); if (!tmp) return NULL; |