aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libgfortran/runtime/convert_char.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/libgfortran/runtime/convert_char.c')
-rw-r--r--gcc-4.9/libgfortran/runtime/convert_char.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc-4.9/libgfortran/runtime/convert_char.c b/gcc-4.9/libgfortran/runtime/convert_char.c
index aa819912a..c3cd1c28c 100644
--- a/gcc-4.9/libgfortran/runtime/convert_char.c
+++ b/gcc-4.9/libgfortran/runtime/convert_char.c
@@ -44,7 +44,7 @@ convert_char1_to_char4 (gfc_char4_t **dst, gfc_charlen_type len,
gfc_charlen_type i, l;
l = len > 0 ? len : 0;
- *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
+ *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
for (i = 0; i < l; i++)
(*dst)[i] = src[i];
@@ -60,7 +60,7 @@ convert_char4_to_char1 (unsigned char **dst, gfc_charlen_type len,
gfc_charlen_type i, l;
l = len > 0 ? len : 0;
- *dst = xmalloc ((l + 1) * sizeof (unsigned char));
+ *dst = xmalloc (l + 1);
for (i = 0; i < l; i++)
(*dst)[i] = src[i];