summaryrefslogtreecommitdiffstats
path: root/usr.sbin/acme-client
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2020-06-07 13:28:17 +0000
committerflorian <florian@openbsd.org>2020-06-07 13:28:17 +0000
commit7f1c04880c7af81785623bdfa12eea0258cdb39b (patch)
treea723432ec1f654c8140038d361602447f39827e1 /usr.sbin/acme-client
parentmainbus(4) and cpu(4). (diff)
downloadwireguard-openbsd-7f1c04880c7af81785623bdfa12eea0258cdb39b.tar.xz
wireguard-openbsd-7f1c04880c7af81785623bdfa12eea0258cdb39b.zip
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.c4
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;