diff --git a/cipher.c b/cipher.c index f12daa123..9c2fbd6cf 100644 --- a/cipher.c +++ b/cipher.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher.c,v 1.121 2024/05/17 02:39:11 jsg Exp $ */ +/* $OpenBSD: cipher.c,v 1.122 2024/08/14 15:42:18 tobias Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -255,7 +255,7 @@ cipher_init(struct sshcipher_ctx **ccp, const struct sshcipher *cipher, #endif *ccp = NULL; - if ((cc = calloc(sizeof(*cc), 1)) == NULL) + if ((cc = calloc(1, sizeof(*cc))) == NULL) return SSH_ERR_ALLOC_FAIL; cc->plaintext = (cipher->flags & CFLAG_NONE) != 0; diff --git a/sshbuf.c b/sshbuf.c index 0ae3095db..1b714e5f9 100644 --- a/sshbuf.c +++ b/sshbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshbuf.c,v 1.22 2024/08/14 15:40:30 tobias Exp $ */ +/* $OpenBSD: sshbuf.c,v 1.23 2024/08/14 15:42:18 tobias Exp $ */ /* * Copyright (c) 2011 Damien Miller * @@ -94,7 +94,7 @@ sshbuf_new(void) { struct sshbuf *ret; - if ((ret = calloc(sizeof(*ret), 1)) == NULL) + if ((ret = calloc(1, sizeof(*ret))) == NULL) return NULL; ret->alloc = SSHBUF_SIZE_INIT; ret->max_size = SSHBUF_SIZE_MAX; @@ -114,7 +114,7 @@ sshbuf_from(const void *blob, size_t len) struct sshbuf *ret; if (blob == NULL || len > SSHBUF_SIZE_MAX || - (ret = calloc(sizeof(*ret), 1)) == NULL) + (ret = calloc(1, sizeof(*ret))) == NULL) return NULL; ret->alloc = ret->size = ret->max_size = len; ret->readonly = 1;