From 10f37345ebbd4822083bd9451f59df6074995bb8 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 4 Dec 2017 11:28:31 +0100 Subject: [PATCH] cleanup: drop impossible test case This test can never be true since info is embeded struct. --- libdm/libdm-deptree.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index 9bc16c988..d0b4658ee 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -1025,7 +1025,7 @@ out: static int _node_clear_table(struct dm_tree_node *dnode, uint16_t udev_flags) { struct dm_task *dmt = NULL, *deps_dmt = NULL; - struct dm_info *info, deps_info; + struct dm_info *info = &dnode->info, deps_info; struct dm_deps *deps = NULL; const char *name, *uuid, *depname, *depuuid; const char *default_uuid_prefix; @@ -1033,11 +1033,6 @@ static int _node_clear_table(struct dm_tree_node *dnode, uint16_t udev_flags) uint32_t i; int r = 0; - if (!(info = &dnode->info)) { - log_error("_node_clear_table failed: missing info"); - return 0; - } - if (!(name = dm_tree_node_get_name(dnode))) { log_error("_node_clear_table failed: missing name"); return 0;