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-09 16:24:08 +02:00
parent 3e7e6ad6ee
commit 23d2d863b7
+1 -1
View File
@@ -2897,7 +2897,7 @@ virCgroupGetPercpuStats(virCgroupPtr group,
goto cleanup;
}
rv = nparams;
rv = param_idx + 1;
cleanup:
VIR_FREE(buf);