Fix return value of virCgroupGetPercpuStats

We need to return the number of successfully populated stats,
not the nparams supplied by the user.
This commit is contained in:
Ján Tomko 2014-04-04 09:26:23 +02:00
parent 3e7e6ad6ee
commit 23d2d863b7

View File

@ -2897,7 +2897,7 @@ virCgroupGetPercpuStats(virCgroupPtr group,
goto cleanup;
}
rv = nparams;
rv = param_idx + 1;
cleanup:
VIR_FREE(buf);