Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst Make an invariant more clear to avoid fals ...



details:   https://anonhg.NetBSD.org/src/rev/89dcf1f63844
branches:  trunk
changeset: 331684:89dcf1f63844
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Aug 19 13:26:27 2014 +0000

description:
Make an invariant more clear to avoid fals positives from coverity scan

diffstat:

 usr.sbin/sysinst/disks.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 3e3f6c7f142c -r 89dcf1f63844 usr.sbin/sysinst/disks.c
--- a/usr.sbin/sysinst/disks.c  Tue Aug 19 13:04:45 2014 +0000
+++ b/usr.sbin/sysinst/disks.c  Tue Aug 19 13:26:27 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disks.c,v 1.4 2014/08/08 20:24:27 riz Exp $ */
+/*     $NetBSD: disks.c,v 1.5 2014/08/19 13:26:27 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1383,7 +1383,7 @@
                }
        }
 
-       if (dkwl.dkwl_nwedges > 0)
+       if (dkwl.dkwl_nwedges > 0 && *dkw != NULL)
                qsort(*dkw, dkwl.dkwl_nwedges, sizeof(**dkw), get_dkwedges_sort);
 
        close(fd);



Home | Main Index | Thread Index | Old Index