Module Name: src
Committed By: christos
Date: Sun May 10 14:08:55 UTC 2015
Modified Files:
src/sys/dev/dm: dm_ioctl.c
Log Message:
CID 976256: Help coverity understand that when the list is empty the head
is NULL.
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/dm/dm_ioctl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/dm/dm_ioctl.c
diff -u src/sys/dev/dm/dm_ioctl.c:1.29 src/sys/dev/dm/dm_ioctl.c:1.30
--- src/sys/dev/dm/dm_ioctl.c:1.29 Thu Oct 2 17:29:44 2014
+++ src/sys/dev/dm/dm_ioctl.c Sun May 10 10:08:54 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_ioctl.c,v 1.29 2014/10/02 21:29:44 justin Exp $ */
+/* $NetBSD: dm_ioctl.c,v 1.30 2015/05/10 14:08:54 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -774,7 +774,7 @@ dm_table_load_ioctl(prop_dictionary_t dm
prop_dictionary_get_cstring(target_dict,
DM_TABLE_PARAMS, (char **) &str);
- if (SLIST_EMPTY(tbl))
+ if (SLIST_EMPTY(tbl) || last_table == NULL)
/* insert this table to head */
SLIST_INSERT_HEAD(tbl, table_en, next);
else