Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst Avoid comparision between array and NULL



details:   https://anonhg.NetBSD.org/src/rev/7029d7d38d46
branches:  trunk
changeset: 331196:7029d7d38d46
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Aug 05 08:39:39 2014 +0000

description:
Avoid comparision between array and NULL

diffstat:

 usr.sbin/sysinst/partman.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (19 lines):

diff -r d6dfe9f04d14 -r 7029d7d38d46 usr.sbin/sysinst/partman.c
--- a/usr.sbin/sysinst/partman.c        Tue Aug 05 08:33:50 2014 +0000
+++ b/usr.sbin/sysinst/partman.c        Tue Aug 05 08:39:39 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: partman.c,v 1.1 2014/08/03 16:09:38 martin Exp $ */
+/*     $NetBSD: partman.c,v 1.2 2014/08/05 08:39:39 martin Exp $ */
 
 /*
  * Copyright 2012 Eugene Lozovoy
@@ -2115,8 +2115,7 @@
                                        pm_i->bsdlabel[i].mnt_opts != NULL))
                                continue;
                        mnts[num_devs].mnt_opts = pm_i->bsdlabel[i].mnt_opts;
-                       if (pm_i->bsdlabel[i].mounted != NULL &&
-                                       strlen(pm_i->bsdlabel[i].mounted) > 0) {
+                       if (strlen(pm_i->bsdlabel[i].mounted) > 0) {
                                /* Device is already mounted. So, doing mount_null */
                                strlcpy(mnts[num_devs].dev, pm_i->bsdlabel[i].mounted, MOUNTLEN);
                                mnts[num_devs].mnt_opts = "-t null";



Home | Main Index | Thread Index | Old Index