Module Name:    src
Committed By:   snj
Date:           Mon May  7 03:49:16 UTC 2018

Modified Files:
        src/usr.sbin/sysinst [netbsd-8]: partman.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #793):
        usr.sbin/sysinst/partman.c: 1.16-1.17
Fix copy paste error. from coverity.
Cosmetics: fix the order of calloc() arguments.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.6.1 src/usr.sbin/sysinst/partman.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/partman.c
diff -u src/usr.sbin/sysinst/partman.c:1.15 src/usr.sbin/sysinst/partman.c:1.15.6.1
--- src/usr.sbin/sysinst/partman.c:1.15	Thu Jan 12 17:38:08 2017
+++ src/usr.sbin/sysinst/partman.c	Mon May  7 03:49:16 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: partman.c,v 1.15 2017/01/12 17:38:08 christos Exp $ */
+/*	$NetBSD: partman.c,v 1.15.6.1 2018/05/07 03:49:16 snj Exp $ */
 
 /*
  * Copyright 2012 Eugene Lozovoy
@@ -2116,7 +2116,7 @@ pm_mountall(void)
 	
 	localfs_dev[0] = '\0';
 	if (mnts == NULL)
-		mnts = calloc(sizeof(*mnts), MAX_MNTS);
+		mnts = calloc(MAX_MNTS, sizeof(*mnts));
 
 	SLIST_FOREACH(pm_i, &pm_head, l) {
 		ok = 0;
@@ -2731,23 +2731,23 @@ partman(void)
 
 		if (!have_raid)
 			remove_raid_options();
-		else if (!(raids = calloc(sizeof(*raids), MAX_RAID)))
+		else if (!(raids = calloc(MAX_RAID, sizeof(*raids))))
 			have_raid = 0;
 			
 #define remove_vnd_options() (void)0
 		if (!have_vnd)
 			remove_vnd_options();
-		else if (!(vnds = calloc(sizeof(*vnds), MAX_VND)))
+		else if (!(vnds = calloc(MAX_VND, sizeof(*vnds))))
 			have_vnd = 0;
 
 		if (!have_cgd)
 			remove_cgd_options();
-		else if (!(cgds = calloc(sizeof(*vnds), MAX_CGD)))
+		else if (!(cgds = calloc(MAX_CGD, sizeof(*cgds))))
 			have_cgd = 0;
 
 		if (!have_lvm)
 			remove_lvm_options();
-		else if (!(lvms = calloc(sizeof(*lvms), MAX_LVM_VG)))
+		else if (!(lvms = calloc(MAX_LVM_VG, sizeof(*lvms))))
 			have_lvm = 0;
 
 		if (!have_gpt)

Reply via email to