diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2020-06-07 13:28:18 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2020-06-07 13:28:18 +0000 |
commit | 28828a01f5fe8659f6dc1fe89cce5ce1bee509de (patch) | |
tree | f45cba4444767ff0fcda5bfc1ab84dff9a4836e0 /usr.sbin/acme-client | |
parent | 8bedf2be51342a95472f57c664b62dec48246dad (diff) |
Swap arguments of calloc(3).
While it doesn't matter for calloc, it's easier on the eyes to always
list the number of elements first and then the size.
From Donovan Watteau ( contrib AT dwatteau.fr), Thanks!
Diffstat (limited to 'usr.sbin/acme-client')
-rw-r--r-- | usr.sbin/acme-client/json.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/acme-client/json.c b/usr.sbin/acme-client/json.c index ca3012f9bd5..15ec57ea512 100644 --- a/usr.sbin/acme-client/json.c +++ b/usr.sbin/acme-client/json.c @@ -1,4 +1,4 @@ -/* $Id: json.c,v 1.17 2020/05/10 17:34:07 florian Exp $ */ +/* $Id: json.c,v 1.18 2020/06/07 13:28:17 florian Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -462,7 +462,7 @@ json_parse_order(struct jsmnn *n, struct order *order) goto err; if (array->fields > 0) { - order->auths = calloc(sizeof(*order->auths), array->fields); + order->auths = calloc(array->fields, sizeof(*order->auths)); if (order->auths == NULL) { warn("malloc"); goto err; |