diff options
author | Alan Modra <amodra@gmail.com> | 2022-05-13 16:43:15 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-05-13 16:43:15 +0930 |
commit | 31b15688c414c7caf957be63d2914faafa1b9dda (patch) | |
tree | e9d162e81034cf547a59a312c82a43df5b9f0a29 /libiberty/xmemdup.c | |
parent | 845cbaa9ffbfd6a1f7976a6c7f3e4461e4d41993 (diff) | |
download | gdb-31b15688c414c7caf957be63d2914faafa1b9dda.zip gdb-31b15688c414c7caf957be63d2914faafa1b9dda.tar.gz gdb-31b15688c414c7caf957be63d2914faafa1b9dda.tar.bz2 |
Import libiberty from gcc
Diffstat (limited to 'libiberty/xmemdup.c')
-rw-r--r-- | libiberty/xmemdup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libiberty/xmemdup.c b/libiberty/xmemdup.c index 4602afd..f2ed41f 100644 --- a/libiberty/xmemdup.c +++ b/libiberty/xmemdup.c @@ -31,11 +31,11 @@ allocated, the remaining memory is zeroed. # endif #endif -PTR -xmemdup (const PTR input, size_t copy_size, size_t alloc_size) +void * +xmemdup (const void *input, size_t copy_size, size_t alloc_size) { - PTR output = xmalloc (alloc_size); + void *output = xmalloc (alloc_size); if (alloc_size > copy_size) memset ((char *) output + copy_size, 0, alloc_size - copy_size); - return (PTR) memcpy (output, input, copy_size); + return (void *) memcpy (output, input, copy_size); } |