imap-send.c: rearrange xcalloc arguments
authorBrian Gesiak <modocache@gmail.com>
Mon, 26 May 2014 15:33:51 +0000 (00:33 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 May 2014 21:02:45 +0000 (14:02 -0700)
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>
imap-send.c
index 0bc6f7fae151ea364e9d141b30b8e68d544a4448..45230e19cdd75e7424544a31a52c44bf275df55b 100644 (file)
@@ -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;