]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Alin Nastac <mrness@gentoo.org>
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 10 May 2009 08:00:24 +0000 (20:00 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 10 May 2009 08:00:24 +0000 (20:00 +1200)
Compile error in xstrdup

lib/util.c

index 199d74db29c940469740d4cc293ea17bc3c14b7b..316e7374398cbf261ea695cb8b4689ee986914a2 100644 (file)
@@ -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);