diff options
author | DJ Delorie <dj@redhat.com> | 2005-05-24 21:01:33 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2005-05-24 21:01:33 +0000 |
commit | abf6a75b428517d9caaf9155212b0b10e0379a99 (patch) | |
tree | 3476694dba1d2c731deb2a131b0d8d6c5dcb0cd3 /libiberty/strndup.c | |
parent | f127898a4db12540b9898e25777c6c3725d119bf (diff) | |
download | gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.zip gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.gz gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/strndup.c')
-rw-r--r-- | libiberty/strndup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libiberty/strndup.c b/libiberty/strndup.c index 9395fc8..9e9b4e2 100644 --- a/libiberty/strndup.c +++ b/libiberty/strndup.c @@ -46,10 +46,10 @@ strndup (const char *s, size_t n) if (n < len) len = n; - result = malloc (len + 1); + result = (char *) malloc (len + 1); if (!result) return 0; result[len] = '\0'; - return memcpy (result, s, len); + return (char *) memcpy (result, s, len); } |