summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-10-06 13:25:28 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-10-06 13:25:28 -0400
commit1f618737993bd95cc94cdec0142d95935823a665 (patch)
tree73d70b4459592219d8bcb9699c806950bdcedfc6
parent1f7acbd88fe739798cc1fb83870690e88b5d04e9 (diff)
downloadroux-1f618737993bd95cc94cdec0142d95935823a665.tar.gz
split long line in idup
-rw-r--r--lisc/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisc/util.c b/lisc/util.c
index c1bfa86..e62fd1a 100644
--- a/lisc/util.c
+++ b/lisc/util.c
@@ -70,7 +70,8 @@ void
 idup(Ins **pd, Ins *s, ulong n)
 {
 	free(*pd);
-	memcpy(*pd = alloc(n * sizeof(Ins)), s, n * sizeof(Ins));
+	*pd = alloc(n * sizeof(Ins));
+	memcpy(*pd, s, n * sizeof(Ins));
 }
 
 Ins *