aboutsummaryrefslogtreecommitdiff
path: root/libiberty/strndup.c
diff options
context:
space:
mode:
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 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);
}