summaryrefslogtreecommitdiff
path: root/libiberty/strndup.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2005-05-24 21:01:33 +0000
committerDJ Delorie <dj@delorie.com>2005-05-24 21:01:33 +0000
commit89c7f9932583efbe420b89437971da682e520b83 (patch)
treed9e972beaab164455b65b67ffd2ca21264c75bd5 /libiberty/strndup.c
parent85805b4389018d6ff9416825b7830d3d807ab34e (diff)
downloadgdb-89c7f9932583efbe420b89437971da682e520b83.tar.gz
merge from gcc
Diffstat (limited to 'libiberty/strndup.c')
-rw-r--r--libiberty/strndup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libiberty/strndup.c b/libiberty/strndup.c
index 9395fc8fe65..9e9b4e2991f 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);
}