1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

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).
This commit is contained in:
Zdenek Kabelac 2017-12-04 15:45:49 +01:00
parent 5abf6b7c21
commit 406b566cfc

View File

@ -519,8 +519,7 @@ static struct dm_tree_node *_create_dm_tree_node(struct dm_tree *dtree,
return NULL; return NULL;
} }
if (uuid && *uuid && if (*uuid && !dm_hash_insert(dtree->uuids, uuid, node)) {
!dm_hash_insert(dtree->uuids, uuid, node)) {
log_error("dtree uuid hash insertion failed"); log_error("dtree uuid hash insertion failed");
dm_hash_remove_binary(dtree->devs, (const char *) &dev, dm_hash_remove_binary(dtree->devs, (const char *) &dev,
sizeof(dev)); sizeof(dev));