diff options
author | Pedro Giffuni <[email protected]> | 2017-04-07 13:36:06 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-04-09 16:07:42 -0700 |
commit | f9ea47db3d2e9494321131f789e8e5e9513b26dc (patch) | |
tree | 035436b6c47106382a7c3fb0a5b7518a5a61ceb3 /lib | |
parent | c0c8cc7b4359b2f6e9c08a4bf56f0be377e3995b (diff) |
OpenZFS 8046 - Let calloc() do the multiplication in libzfs_fru_refresh
Authored by: Pedro Giffuni <[email protected]>
Approved by: Robert Mustacchi <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Paul Dagnelie <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Ported-by: Giuseppe Di Natale <[email protected]>
OpenZFS-issue: https://www.illumos.org/issues/8046
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/3a3c0d5
Closes #5989
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_fru.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_fru.c b/lib/libzfs/libzfs_fru.c index bb278aa7b..2ee8bdfb2 100644 --- a/lib/libzfs/libzfs_fru.c +++ b/lib/libzfs/libzfs_fru.c @@ -284,7 +284,7 @@ libzfs_fru_refresh(libzfs_handle_t *hdl) if (hdl->libzfs_fru_hash == NULL && (hdl->libzfs_fru_hash = - calloc(ZFS_FRU_HASH_SIZE * sizeof (void *), 1)) == NULL) + calloc(ZFS_FRU_HASH_SIZE, sizeof (void *))) == NULL) return; /* |