Fix trivial calloc(3) arguments order

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <freqlabs@FreeBSD.org>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Closes #13052
This commit is contained in:
Tomohiro Kusumi
2022-02-03 04:27:35 +09:00
committed by GitHub
parent 15aa38690e
commit 955bf4dc04
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -181,7 +181,7 @@ write_map(const char *filename, nvlist_t *allcfgs)
* no locking, it only guarantees the packed nvlist on disk
* is updated atomically and is internally consistent.
*/
char *tmpname = calloc(MAXPATHLEN, 1);
char *tmpname = calloc(1, MAXPATHLEN);
if (tmpname == NULL) {
free(buf);
return (ENOMEM);