summary refs log tree commit diff
path: root/lisc/util.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-10-06 13:22:46 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-10-06 13:22:46 -0400
commit1f7acbd88fe739798cc1fb83870690e88b5d04e9 (patch)
tree4c35a31510d9e852f7b5bb0266fc7bfc57b010d8 /lisc/util.c
parentce72ad0ecdb43f6572c1febe8993d817f572f269 (diff)
downloadroux-1f7acbd88fe739798cc1fb83870690e88b5d04e9.tar.gz
specialize vdup into idup
Diffstat (limited to 'lisc/util.c')
-rw-r--r--lisc/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisc/util.c b/lisc/util.c
index 723a8db..c1bfa86 100644
--- a/lisc/util.c
+++ b/lisc/util.c
@@ -67,10 +67,10 @@ bcnt(Bits *b)
 }
 
 void
-vdup(void *pd, void *s, size_t sz)
+idup(Ins **pd, Ins *s, ulong n)
 {
-	free(*(void **)pd);
-	memcpy(*(void **)pd = alloc(sz), s, sz);
+	free(*pd);
+	memcpy(*pd = alloc(n * sizeof(Ins)), s, n * sizeof(Ins));
 }
 
 Ins *