summaryrefslogtreecommitdiffstats
path: root/cmd-set-buffer.c
diff options
context:
space:
mode:
authornicm <nicm>2014-10-08 17:35:58 +0000
committernicm <nicm>2014-10-08 17:35:58 +0000
commita27ba6e38006c12c48de88600b8cff9f6aabfed7 (patch)
treefc8ecf1c1b965f70b95d0a3e472cd0b1a2e1d2c9 /cmd-set-buffer.c
parent77efcf8bdd14cd19dc445cf6e44bba7af414939c (diff)
Add xreallocarray and remove nmemb argument from xrealloc.
Diffstat (limited to 'cmd-set-buffer.c')
-rw-r--r--cmd-set-buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-set-buffer.c b/cmd-set-buffer.c
index 5a82b4d8..88bd0c10 100644
--- a/cmd-set-buffer.c
+++ b/cmd-set-buffer.c
@@ -104,7 +104,7 @@ cmd_set_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
memcpy(pdata, pb->data, psize);
}
- pdata = xrealloc(pdata, 1, psize + newsize);
+ pdata = xrealloc(pdata, psize + newsize);
memcpy(pdata + psize, args->argv[0], newsize);
psize += newsize;