master - cleanup: reorder code
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=21f6511bc200af434fb933a181f5334021b3ee08 Commit: 21f6511bc200af434fb933a181f5334021b3ee08 Parent: 13835d04ac2a2c518ec935d220c7feb711327884 Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Dec 14 19:43:42 2012 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Sat Dec 15 14:57:40 2012 +0100
cleanup: reorder code
Swap if() test condition and check for failure
and use traditional 'stack' trace.
--- lib/format_text/format-text.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
lib/format_text/format-text.c +5 -4
@@ -2226,11 +2226,12 @@ static struct format_instance *_text_create_text_instance(const struct format_tyif (!(fid =alloc_fid (fmt, fic))) return_NULL; -if (_create_vg_text_instance (fid, fic)) -return fid; +if (!_create_vg_text_instance (fid, fic)) { +dm_pool_destroy (fid->mem); + return_NULL; + } -dm_pool_destroy (fid->mem); -return NULL ; +return fid; }static struct format_handler _text_handler = {