From 0ff2e3c812858d876c9977daf8f51ce5edb60d7e Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 28 Nov 2017 08:11:07 +0100 Subject: [PATCH] virt plugin: Remove `do {} while(0)` loop around macro. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The `continue` in the macro was supposed to continue the `for` loop, but was (unexpectedly) exiting the do…while loop instead. CID: 179238 --- src/virt.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/virt.c b/src/virt.c index ca6e831e..174db2fa 100644 --- a/src/virt.c +++ b/src/virt.c @@ -444,12 +444,10 @@ static void init_block_info(struct lv_block_info *binfo) { #ifdef HAVE_BLOCK_STATS_FLAGS #define GET_BLOCK_INFO_VALUE(NAME, FIELD) \ - do { \ - if (!strcmp(param[i].field, NAME)) { \ - binfo->FIELD = param[i].value.l; \ - continue; \ - } \ - } while (0) + if (!strcmp(param[i].field, NAME)) { \ + binfo->FIELD = param[i].value.l; \ + continue; \ + } static int get_block_info(struct lv_block_info *binfo, virTypedParameterPtr param, int nparams) { -- 2.11.0