diff options
Diffstat (limited to 'libgfortran/generated/spread_c8.c')
-rw-r--r-- | libgfortran/generated/spread_c8.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgfortran/generated/spread_c8.c b/libgfortran/generated/spread_c8.c index 17e1cd563b4..b01627e53be 100644 --- a/libgfortran/generated/spread_c8.c +++ b/libgfortran/generated/spread_c8.c @@ -102,8 +102,8 @@ spread_c8 (gfc_array_c8 *ret, const gfc_array_c8 *source, } ret->offset = 0; - /* xmalloc allocates a single byte for zero size. */ - ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8)); + /* xmallocarray allocates a single byte for zero size. */ + ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8)); if (rs <= 0) return; } @@ -245,7 +245,7 @@ spread_scalar_c8 (gfc_array_c8 *ret, const GFC_COMPLEX_8 *source, if (ret->base_addr == NULL) { - ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8)); + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8)); ret->offset = 0; GFC_DIMENSION_SET(ret->dim[0], 0, ncopies, sizeof (GFC_COMPLEX_8)); } |