]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Alin Nastac <mrness@gentoo.org>
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 23 May 2009 04:51:23 +0000 (16:51 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 23 May 2009 04:51:23 +0000 (16:51 +1200)
Compile error in xstrdup

lib/util.c

index a48a6f0637fcb4e9f1c0e332da38035cb0e50b43..993648b0550e7a15454fece12e1fc53e6d149e2a 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);