summaryrefslogtreecommitdiff
path: root/sys/dev/dm/dm_ioctl.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2015-05-10 14:08:54 +0000
committerchristos <christos@NetBSD.org>2015-05-10 14:08:54 +0000
commite82bcfc5c5d0f88e0a79c76ed01f3c535561a319 (patch)
treec50a73e0d04c08884113a928999936952d58fe68 /sys/dev/dm/dm_ioctl.c
parent6fcd9a89ea999a7b7d4c1cf8112b1fa7fb0638ec (diff)
CID 976256: Help coverity understand that when the list is empty the head
is NULL.
Diffstat (limited to 'sys/dev/dm/dm_ioctl.c')
-rw-r--r--sys/dev/dm/dm_ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/dm/dm_ioctl.c b/sys/dev/dm/dm_ioctl.c
index 3ae5d301ceb..8f66da08ed1 100644
--- a/sys/dev/dm/dm_ioctl.c
+++ b/sys/dev/dm/dm_ioctl.c
@@ -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_dict)
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