aboutsummaryrefslogtreecommitdiff
path: root/libiberty/xstrndup.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2005-05-24 21:01:33 +0000
committerDJ Delorie <dj@redhat.com>2005-05-24 21:01:33 +0000
commitabf6a75b428517d9caaf9155212b0b10e0379a99 (patch)
tree3476694dba1d2c731deb2a131b0d8d6c5dcb0cd3 /libiberty/xstrndup.c
parentf127898a4db12540b9898e25777c6c3725d119bf (diff)
downloadgdb-abf6a75b428517d9caaf9155212b0b10e0379a99.zip
gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.gz
gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/xstrndup.c')
-rw-r--r--libiberty/xstrndup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libiberty/xstrndup.c b/libiberty/xstrndup.c
index 68c5f45..0a41f60 100644
--- a/libiberty/xstrndup.c
+++ b/libiberty/xstrndup.c
@@ -53,8 +53,8 @@ xstrndup (const char *s, size_t n)
if (n < len)
len = n;
- result = xmalloc (len + 1);
+ result = XNEWVEC (char, len + 1);
result[len] = '\0';
- return memcpy (result, s, len);
+ return (char *) memcpy (result, s, len);
}