Skip to content
This repository has been archived by the owner on Mar 14, 2022. It is now read-only.

Commit

Permalink
virt plugin: Remove do {} while(0) loop around macro.
Browse files Browse the repository at this point in the history
The `continue` in the macro was supposed to continue the `for` loop, but
was (unexpectedly) exiting the do…while loop instead.

CID: 179238
  • Loading branch information
octo authored and charless-splunk committed Dec 4, 2017
1 parent ad28b16 commit 2b45214
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/virt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2b45214

Please sign in to comment.