master - cleanup: drop unneeded check
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=406b566cfc4be2cc04157ea7bd3c24ea729a4bb5 Commit: 406b566cfc4be2cc04157ea7bd3c24ea729a4bb5 Parent: 5abf6b7c21c86531eedeebe56de2633d43ef1879 Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Dec 4 15:45:49 2017 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Dec 4 15:45:49 2017 +0100
cleanup: drop unneeded check
Code already has dereferenced UUID before this point, and its already given we require name & uuid when ading new node (although uuid could be empty string).
--- libdm/libdm-deptree.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
libdm/libdm-deptree.c +2 -3
@@ -513,14 +513,13 @@ static struct dm_tree_node *_create_dm_tree_node(struct dm_tree *dtree, dev =MKDEV ((dev_t )info->major, (dev_t )info->minor);if (!dm_hash_insert_binary (dtree->devs, (const char *) &dev, -sizeof (dev), node)) { +sizeof (dev), node)) {log_error ("dtree node hash insertion failed" );dm_pool_free (dtree->mem, node);return NULL ; } -if (uuid && *uuid && - !dm_hash_insert (dtree->uuids, uuid, node)) { +if (*uuid && !dm_hash_insert (dtree->uuids, uuid, node)) {log_error ("dtree uuid hash insertion failed" );dm_hash_remove_binary (dtree->devs, (const char *) &dev,sizeof (dev));