Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst Fix a few calloc() calls with wrong arg ord...



details:   https://anonhg.NetBSD.org/src/rev/6a0712c6c3d6
branches:  trunk
changeset: 457967:6a0712c6c3d6
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Jul 25 13:16:35 2019 +0000

description:
Fix a few calloc() calls with wrong arg order (harmless, but for consistency)

diffstat:

 usr.sbin/sysinst/gpt.c |  4 ++--
 usr.sbin/sysinst/mbr.c |  8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r c3629ad8bb47 -r 6a0712c6c3d6 usr.sbin/sysinst/gpt.c
--- a/usr.sbin/sysinst/gpt.c    Thu Jul 25 13:11:15 2019 +0000
+++ b/usr.sbin/sysinst/gpt.c    Thu Jul 25 13:16:35 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gpt.c,v 1.2 2019/06/23 11:47:08 martin Exp $   */
+/*     $NetBSD: gpt.c,v 1.3 2019/07/25 13:16:35 martin Exp $   */
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -394,7 +394,7 @@
                return NULL;
        }
 
-       parts = calloc(sizeof(*parts), 1);
+       parts = calloc(1, sizeof(*parts));
        if (!parts)
                return NULL;
 
diff -r c3629ad8bb47 -r 6a0712c6c3d6 usr.sbin/sysinst/mbr.c
--- a/usr.sbin/sysinst/mbr.c    Thu Jul 25 13:11:15 2019 +0000
+++ b/usr.sbin/sysinst/mbr.c    Thu Jul 25 13:16:35 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbr.c,v 1.16 2019/07/12 18:23:06 martin Exp $ */
+/*     $NetBSD: mbr.c,v 1.17 2019/07/25 13:16:35 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -570,7 +570,7 @@
                        ext_base = next_ext;
                        next_ext = 0;
                }
-               ext = calloc(sizeof *ext, 1);
+               ext = calloc(1, sizeof *ext);
                if (!ext)
                        break;
                mbrs = &ext->mbr;
@@ -829,7 +829,7 @@
        if (start != 0)
                return NULL;
 
-       parts = calloc(sizeof(*parts), 1);
+       parts = calloc(1, sizeof(*parts));
        if (!parts)
                return NULL;
 
@@ -892,7 +892,7 @@
        if (start != 0)
                return NULL;
 
-       parts = calloc(sizeof(*parts), 1);
+       parts = calloc(1, sizeof(*parts));
        if (!parts)
                return NULL;
 



Home | Main Index | Thread Index | Old Index