Skip to contentSkip to conversation

LVM2/lib/metadata thin_manip.c

PATCH [email protected] 1 participant 1 message Feb 12, 2012

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2012-02-12 21:42:43

Modified files:
lib/metadata : thin_manip.c

Log message:
use stack consistently if 0 is considered an error

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/thin_manip.c.diff?cvsroot=lvm2&r1=1.33&r2=1.34

lib/metadata/thin_manip.c +6 -10
@@ -225,22 +225,18 @@
 				     DEFAULT_THIN_POOL_AUTOEXTEND_THRESHOLD);
 
 	/* Data */
-	if (!lv_thin_pool_percent(pool_seg->lv, 0, &percent)) {
-		stack;
-		return 0;
-	}
+	if (!lv_thin_pool_percent(pool_seg->lv, 0, &percent))
+		return_0;
 
 	if (percent >= threshold)
-		return 0;
+		return_0;
 
 	/* Metadata */
-	if (!lv_thin_pool_percent(pool_seg->lv, 1, &percent)) {
-		stack;
-		return 0;
-	}
+	if (!lv_thin_pool_percent(pool_seg->lv, 1, &percent))
+		return_0;
 
 	if (percent >= threshold)
-		return 0;
+		return_0;
 
 	return 1;
 }