From 082628eb2c53181ce8b015921387a9c4e367678a Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 15 Apr 2008 14:57:12 +0000 Subject: [PATCH] missing stack --- lib/cache/lvmcache.c | 8 ++++---- tools/vgsplit.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index b543ad66c..cf833c046 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -420,10 +420,10 @@ struct volume_group *lvmcache_get_vg(const char *vgid, unsigned precommitted) (!precommitted && vginfo->precommitted)) return NULL; - fid = vginfo->fmt->ops->create_instance(vginfo->fmt, vginfo->vgname, - vgid, NULL); - if (!fid) - return NULL; + if (!(fid = vginfo->fmt->ops->create_instance(vginfo->fmt, + vginfo->vgname, + vgid, NULL))) + return_NULL; if (!(vg = import_vg_from_buffer(vginfo->vgmetadata, fid)) || !vg_validate(vg)) { diff --git a/tools/vgsplit.c b/tools/vgsplit.c index 6b89f429b..c0cb47632 100644 --- a/tools/vgsplit.c +++ b/tools/vgsplit.c @@ -175,7 +175,7 @@ static int _move_lvs(struct volume_group *vg_from, struct volume_group *vg_to) /* Move this LV */ if (!_move_one_lv(vg_from, vg_to, lvh)) - return 0; + return_0; } /* FIXME Ensure no LVs contain segs pointing at LVs in the other VG */ @@ -221,7 +221,7 @@ static int _move_snapshots(struct volume_group *vg_from, if (_lv_is_in_vg(vg_to, seg->cow) && _lv_is_in_vg(vg_to, seg->origin)) { if (!_move_one_lv(vg_from, vg_to, lvh)) - return 0; + return_0; } } @@ -263,7 +263,7 @@ static int _move_mirrors(struct volume_group *vg_from, if (seg_in == seg->area_count && log_in) { if (!_move_one_lv(vg_from, vg_to, lvh)) - return 0; + return_0; } }