From 1b58875ad7966cf2c85ee8e92f3da04f0a3b2f7a Mon Sep 17 00:00:00 2001 From: John Levon Date: Tue, 18 Dec 2018 17:54:15 +0000 Subject: 10100 Illumos is confused about calloc() arguments Reviewed by: Toomas Soome Reviewed by: Gergő Doma Approved by: Dan McDonald MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/src/lib/libipmi/common/libipmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr/src/lib/libipmi/common/libipmi.c') diff --git a/usr/src/lib/libipmi/common/libipmi.c b/usr/src/lib/libipmi/common/libipmi.c index 63e985755c..cf7c7e6145 100644 --- a/usr/src/lib/libipmi/common/libipmi.c +++ b/usr/src/lib/libipmi/common/libipmi.c @@ -21,6 +21,8 @@ /* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright (c) 2018, Joyent, Inc. */ #include @@ -37,7 +39,7 @@ ipmi_open(int *errp, char **msg, uint_t xport_type, nvlist_t *params) if (msg) *msg = NULL; - if ((ihp = calloc(sizeof (ipmi_handle_t), 1)) == NULL) { + if ((ihp = calloc(1, sizeof (ipmi_handle_t))) == NULL) { *errp = EIPMI_NOMEM; if (msg) *msg = "memory allocation failure"; -- cgit v1.2.3