summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Brian Gesiak <modocache@gmail.com>2014-05-27 00:33:51 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-05-27 14:02:45 -0700
commit3345c0f5b98be4e2b567bc22dc200395468cabd6 (patch)
tree68f4f0e1948c471bd0fcd11d37e92790f23886dc
parenthttp-push.c: rearrange xcalloc arguments (diff)
downloadtgif-3345c0f5b98be4e2b567bc22dc200395468cabd6.tar.xz
imap-send.c: rearrange xcalloc arguments
xcalloc() takes two arguments: the number of elements and their size. imap_open_store() passes the arguments in reverse order, passing the size of an imap_store*, followed by the number to allocate. Rearrange them so they are in the correct order. Signed-off-by: Brian Gesiak <modocache@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--imap-send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/imap-send.c b/imap-send.c
index 0bc6f7fae1..45230e19cd 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -951,7 +951,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc)
char *arg, *rsp;
int s = -1, preauth;
- ctx = xcalloc(sizeof(*ctx), 1);
+ ctx = xcalloc(1, sizeof(*ctx));
ctx->imap = imap = xcalloc(sizeof(*imap), 1);
imap->buf.sock.fd[0] = imap->buf.sock.fd[1] = -1;