calloc() and xcalloc() takes nmemb and then size
There are a handful more instances of this in compat/regex/ but they are borrowed code taht we do not want to touch with a change that really affects correctness, which this change is not. Signed-off-by: Arjun Sreedharan <arjun024@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
96db324a73
commit
693eb02a5e
@ -954,7 +954,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc)
|
||||
|
||||
ctx = xcalloc(1, sizeof(*ctx));
|
||||
|
||||
ctx->imap = imap = xcalloc(sizeof(*imap), 1);
|
||||
ctx->imap = imap = xcalloc(1, sizeof(*imap));
|
||||
imap->buf.sock.fd[0] = imap->buf.sock.fd[1] = -1;
|
||||
imap->in_progress_append = &imap->in_progress;
|
||||
|
||||
|
Reference in New Issue
Block a user