diff options
Diffstat (limited to 'libgfortran/intrinsics/pack_generic.c')
-rw-r--r-- | libgfortran/intrinsics/pack_generic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgfortran/intrinsics/pack_generic.c b/libgfortran/intrinsics/pack_generic.c index 87937a2c5e2..00f98eae682 100644 --- a/libgfortran/intrinsics/pack_generic.c +++ b/libgfortran/intrinsics/pack_generic.c @@ -154,8 +154,8 @@ pack_internal (gfc_array_char *ret, const gfc_array_char *array, GFC_DIMENSION_SET (ret->dim[0], 0, total, size); ret->offset = 0; - /* xmalloc allocates a single byte for zero size. */ - ret->base_addr = xmalloc (size * total); + /* xmallocarray allocates a single byte for zero size. */ + ret->base_addr = xmallocarray (total, size); if (total == 0) return; /* In this case, nothing remains to be done. */ @@ -515,7 +515,7 @@ pack_s_internal (gfc_array_char *ret, const gfc_array_char *array, ret->offset = 0; - ret->base_addr = xmalloc (size * total); + ret->base_addr = xmallocarray (total, size); if (total == 0) return; |