aboutsummaryrefslogtreecommitdiff
path: root/gas/as.h
diff options
context:
space:
mode:
Diffstat (limited to 'gas/as.h')
-rw-r--r--gas/as.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/gas/as.h b/gas/as.h
index 14a768f..f3f12fb 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -484,9 +484,7 @@ void add_debug_prefix_map (const char *);
static inline char *
xmemdup0 (const char *in, size_t len)
{
- char *out = (char *) xmalloc (len + 1);
- out[len] = 0;
- return (char *) memcpy (out, in, len);
+ return xmemdup (in, len, len + 1);
}
struct expressionS;