Module Name: src
Committed By: martin
Date: Tue Aug 19 13:26:27 UTC 2014
Modified Files:
src/usr.sbin/sysinst: disks.c
Log Message:
Make an invariant more clear to avoid fals positives from coverity scan
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/disks.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/disks.c
diff -u src/usr.sbin/sysinst/disks.c:1.4 src/usr.sbin/sysinst/disks.c:1.5
--- src/usr.sbin/sysinst/disks.c:1.4 Fri Aug 8 20:24:27 2014
+++ src/usr.sbin/sysinst/disks.c Tue Aug 19 13:26:27 2014
@@ -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 @@ get_dkwedges(struct dkwedge_info **dkw,
}
}
- if (dkwl.dkwl_nwedges > 0)
+ if (dkwl.dkwl_nwedges > 0 && *dkw != NULL)
qsort(*dkw, dkwl.dkwl_nwedges, sizeof(**dkw), get_dkwedges_sort);
close(fd);