Skip to contentSkip to conversation

master - thin: remove unneeed test for NULL

PATCH Zdenek Kabelac 1 participant 1 message Mar 16, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2a139993b40c4497536a2a0b6d826c73213b332d
Commit:        2a139993b40c4497536a2a0b6d826c73213b332d
Parent:        0dcb928d1e7fb75d6481923effe509237de119de
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Mar 16 00:34:31 2017 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Thu Mar 16 01:02:10 2017 +0100

thin: remove unneeed test for NULL

In this API NULL is not valid parameter so do not check for it.

---
 lib/metadata/thin_manip.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
lib/metadata/thin_manip.c +1 -2
index d1259b4..71f9cc0 100644
@@ -649,8 +649,7 @@ int update_thin_pool_params(struct cmd_context *cmd,
 			return_0;
 	}
 
-	if (zero_new_blocks &&
-	    (*zero_new_blocks == THIN_ZERO_UNSELECTED) &&
+	if ((*zero_new_blocks == THIN_ZERO_UNSELECTED) &&
 	    find_config_tree_node(cmd, allocation_thin_pool_zero_CFG, profile))
 		*zero_new_blocks = find_config_tree_bool(cmd, allocation_thin_pool_zero_CFG, profile)
 			? THIN_ZERO_YES : THIN_ZERO_NO;