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>
Brian Gesiak committed
May 27, 2014 at 00:33 UTC
3345c0f5b98be4e2b567bc22dc200395468cabd6
1 file changed
+1
-1
imap-send.c
+1
-1
@@ -951,7 +951,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc)
951
char *arg, *rsp;
952
int s = -1, preauth;
953
954
- ctx = xcalloc(sizeof(*ctx), 1);
954
+ ctx = xcalloc(1, sizeof(*ctx));
955
956
ctx->imap = imap = xcalloc(sizeof(*imap), 1);
957
imap->buf.sock.fd[0] = imap->buf.sock.fd[1] = -1;