Skip to content

Commit 3345c0f

Browse files
modocachegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f3d51ff commit 3345c0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imap-send.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc)
951951
char *arg, *rsp;
952952
int s = -1, preauth;
953953

954-
ctx = xcalloc(sizeof(*ctx), 1);
954+
ctx = xcalloc(1, sizeof(*ctx));
955955

956956
ctx->imap = imap = xcalloc(sizeof(*imap), 1);
957957
imap->buf.sock.fd[0] = imap->buf.sock.fd[1] = -1;

0 commit comments

Comments
 (0)