/* Runtime conversion of strings from one character kind to another.
- Copyright 2008, 2009, 2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 Free Software Foundation, Inc.
This file is part of the GNU Fortran runtime library (libgfortran).
#include "libgfortran.h"
-#include <stdlib.h>
-#include <string.h>
-
extern void convert_char1_to_char4 (gfc_char4_t **, gfc_charlen_type,
const unsigned char *);
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];
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];