From: Ján Tomko Date: Fri, 4 Apr 2014 07:26:23 +0000 (+0200) Subject: Fix return value of virCgroupGetPercpuStats X-Git-Tag: v1.2.4-rc1~127 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=23d2d863b719be18f29306ecec41ee319b63e04f;p=thirdparty%2Flibvirt.git Fix return value of virCgroupGetPercpuStats We need to return the number of successfully populated stats, not the nparams supplied by the user. --- diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index b881c8c2b1..1ff3dadb9c 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -2897,7 +2897,7 @@ virCgroupGetPercpuStats(virCgroupPtr group, goto cleanup; } - rv = nparams; + rv = param_idx + 1; cleanup: VIR_FREE(buf);