Print this page
10100 Illumos is confused about calloc() arguments
*** 20,29 ****
--- 20,31 ----
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2018, Joyent, Inc.
*/
#include <stdlib.h>
#include <strings.h>
#include <unistd.h>
*** 58,68 ****
int sobufsz;
if (hp == NULL)
return (ILB_STATUS_EINVAL);
! hi = calloc(sizeof (*hi), 1);
if (hi == NULL)
return (ILB_STATUS_ENOMEM);
if (cond_init(&hi->h_cv, USYNC_THREAD, NULL) != 0) {
rc = ILB_STATUS_INTERNAL;
--- 60,70 ----
int sobufsz;
if (hp == NULL)
return (ILB_STATUS_EINVAL);
! hi = calloc(1, sizeof (*hi));
if (hi == NULL)
return (ILB_STATUS_ENOMEM);
if (cond_init(&hi->h_cv, USYNC_THREAD, NULL) != 0) {
rc = ILB_STATUS_INTERNAL;