diff options
author | Peter Krempa <pkrempa@redhat.com> | 2018-08-01 09:15:22 +0200 |
---|---|---|
committer | Peter Krempa <pkrempa@redhat.com> | 2018-08-01 09:15:22 +0200 |
commit | 78f47a6395c0f71ca47fb5e328052db054508ddf (patch) | |
tree | 204207057e767e379bc1392493556dd0013f29bb | |
parent | ce3c6ef6843f98d81be5423ece11fad79eaab920 (diff) | |
download | libvirt-78f47a6395c0f71ca47fb5e328052db054508ddf.tar.gz |
qemu: monitor: Fix incrementing of 'nstats' in qemuMonitorJSONBlockStatsCollectData
commit 8d9ca6cdb3a5 refactored qemuMonitorJSONBlockStatsCollectData so
that the number of stats is passed back via a pointer. The commit failed
to fix the macro which increments the number of stats to increment the
actual pointee.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
-rw-r--r-- | src/qemu/qemu_monitor_json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 9acf62e0bb..2921f110a9 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2299,7 +2299,7 @@ qemuMonitorJSONBlockStatsCollectData(virJSONValuePtr dev, #define QEMU_MONITOR_BLOCK_STAT_GET(NAME, VAR, MANDATORY) \ if (MANDATORY || virJSONValueObjectHasKey(stats, NAME)) { \ - nstats++; \ + (*nstats)++; \ if (virJSONValueObjectGetNumberLong(stats, NAME, &VAR) < 0) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ _("cannot read %s statistic"), NAME); \ |