diff options
Diffstat (limited to 'libgfortran/generated/spread_c10.c')
-rw-r--r-- | libgfortran/generated/spread_c10.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgfortran/generated/spread_c10.c b/libgfortran/generated/spread_c10.c index ad58e34bc22..592443e71aa 100644 --- a/libgfortran/generated/spread_c10.c +++ b/libgfortran/generated/spread_c10.c @@ -101,8 +101,8 @@ spread_c10 (gfc_array_c10 *ret, const gfc_array_c10 *source, } ret->offset = 0; - /* xmalloc allocates a single byte for zero size. */ - ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10)); + /* xmallocarray allocates a single byte for zero size. */ + ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10)); if (rs <= 0) return; } @@ -244,7 +244,7 @@ spread_scalar_c10 (gfc_array_c10 *ret, const GFC_COMPLEX_10 *source, if (ret->base_addr == NULL) { - ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10)); + ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10)); ret->offset = 0; GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1); } |