gas: NEWS: Add the RISC-V features for 2.39
[binutils-gdb.git] / libiberty / xmemdup.c
index 4602afd7d9f6acb5e1bc57c2bd5ac3da4e25d5aa..f2ed41f9b4d9c659dbec0eb7c84df9f77ffe6d65 100644 (file)
@@ -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);
 }