Skip to contentSkip to conversation

master - cleanup: drop !! from code

PATCH Zdenek Kabelac 1 participant 1 message Feb 17, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4bb60c05bfc5b1be101807302e0697a4508dd98c
Commit:        4bb60c05bfc5b1be101807302e0697a4508dd98c
Parent:        cb144c0097fe111d9881457de7c686c190c07944
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Tue Feb 17 13:39:47 2015 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue Feb 17 13:39:47 2015 +0100

cleanup: drop !! from code

It's unused piece of code - but gcc5 noticed problem with usage of !! on the leftside.

---
 tools/vgsplit.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
tools/vgsplit.c +4 -4
index 362f854..607f8e0 100644
@@ -350,7 +350,7 @@ static int _move_cache(struct volume_group *vg_from,
 			data = seg_lv(first_seg(seg->pool_lv), 0);
 			meta = first_seg(seg->pool_lv)->metadata_lv;
 			/* Ensure all components are coming along */
-			is_moving = !!_lv_is_in_vg(vg_to, orig);
+			is_moving = _lv_is_in_vg(vg_to, orig);
 		} else {
 			if (!dm_list_empty(&seg->lv->segs_using_this_lv) &&
 			    !(cache_seg = get_only_segment_using_this_lv(seg->lv)))
@@ -364,20 +364,20 @@ static int _move_cache(struct volume_group *vg_from,
 				is_moving = 1;
 		}
 
-		if (orig && (!!_lv_is_in_vg(vg_to, orig) != is_moving)) {
+		if (orig && (_lv_is_in_vg(vg_to, orig) != is_moving)) {
 			log_error("Can't split %s and its origin (%s)"
 				  " into separate VGs", lv->name, orig->name);
 			return 0;
 		}
 
-		if (data && (!!_lv_is_in_vg(vg_to, data) != is_moving)) {
+		if (data && (_lv_is_in_vg(vg_to, data) != is_moving)) {
 			log_error("Can't split %s and its cache pool"
 				  " data LV (%s) into separate VGs",
 				  lv->name, data->name);
 			return 0;
 		}
 
-		if (meta && (!!_lv_is_in_vg(vg_to, meta) != is_moving)) {
+		if (meta && (_lv_is_in_vg(vg_to, meta) != is_moving)) {
 			log_error("Can't split %s and its cache pool"
 				  " metadata LV (%s) into separate VGs",
 				  lv->name, meta->name);