Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/usr.sbin/sysinst Pull up following revision(...



details:   https://anonhg.NetBSD.org/src/rev/01f26beceb09
branches:  netbsd-8
changeset: 318844:01f26beceb09
user:      snj <snj%NetBSD.org@localhost>
date:      Mon May 07 03:49:16 2018 +0000
description:
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.

diffstat:

 usr.sbin/sysinst/partman.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (46 lines):

diff -r ea66f8cf8699 -r 01f26beceb09 usr.sbin/sysinst/partman.c
--- a/usr.sbin/sysinst/partman.c        Sun May 06 13:10:10 2018 +0000
+++ b/usr.sbin/sysinst/partman.c        Mon May 07 03:49:16 2018 +0000
@@ -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 @@
        
        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 @@
 
                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)



Home | Main Index | Thread Index | Old Index