mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Fix calloc(3) arguments order
calloc(3) takes `nelem` (or `nmemb` in glibc) first, and then size of elements. No difference expected for having these in reverse order, however should follow the standard. http://pubs.opengroup.org/onlinepubs/009695399/functions/calloc.html Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@osnexus.com> Closes #7405
This commit is contained in:
committed by
Brian Behlendorf
parent
7403d0743e
commit
8111eb4abc
@@ -194,7 +194,7 @@ main(int argc, char **argv)
|
||||
if (buf)
|
||||
free(buf);
|
||||
bufsz = (size_t)st.st_blksize;
|
||||
buf = calloc(bufsz, 1);
|
||||
buf = calloc(1, bufsz);
|
||||
if (buf == NULL) {
|
||||
(void) fprintf(stderr, gettext(
|
||||
"Could not allocate buffer of"
|
||||
|
||||
Reference in New Issue
Block a user