From 9c6834f4c099677f0737a2aded1afa682288deab Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sat, 23 May 2009 16:51:23 +1200 Subject: [PATCH] Author: Alin Nastac Compile error in xstrdup --- lib/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/util.c b/lib/util.c index a48a6f0637..993648b055 100644 --- a/lib/util.c +++ b/lib/util.c @@ -751,7 +751,8 @@ xstrdup(const char *s) /* copy string, including terminating character */ sz = strlen(s) + 1; - p = memcpy((char *)xmalloc(sz), s, sz); + p = (char *)xmalloc(sz); + memcpy(p, s, sz); PROF_stop(xstrdup); -- 2.47.2