1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

use stack consistently if 0 is considered an error

This commit is contained in:
Alasdair Kergon 2012-02-12 21:42:43 +00:00
parent 2a434c479d
commit f3f6c17250

View File

@ -225,22 +225,18 @@ int pool_below_threshold(const struct lv_segment *pool_seg)
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;
}