From 0d95082aa97b92d120daf1858acd91abe788d2cb Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 26 Oct 2016 11:26:02 +0200 Subject: [PATCH] cleanup: remove goto Move goto path into 'if()' branch. --- daemons/dmeventd/plugins/mirror/dmeventd_mirror.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c b/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c index 765341355..a7ed4dd77 100644 --- a/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c +++ b/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c @@ -73,8 +73,10 @@ static int _get_mirror_event(struct dso_state *state, char *params) unsigned i; struct dm_status_mirror *ms; - if (!dm_get_status_mirror(state->mem, params, &ms)) - goto_out; + if (!dm_get_status_mirror(state->mem, params, &ms)) { + log_error("Unable to parse mirror status string."); + return ME_IGNORE; + } /* Check for bad mirror devices */ for (i = 0; i < ms->dev_count; ++i) @@ -95,11 +97,6 @@ static int _get_mirror_event(struct dso_state *state, char *params) dm_pool_free(state->mem, ms); return r; - -out: - log_error("Unable to parse mirror status string."); - - return ME_IGNORE; } static int _remove_failed_devices(const char *cmd_lvscan, const char *cmd_lvconvert)