]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix return value of virCgroupGetPercpuStats
authorJán Tomko <jtomko@redhat.com>
Fri, 4 Apr 2014 07:26:23 +0000 (09:26 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 9 Apr 2014 14:24:08 +0000 (16:24 +0200)
We need to return the number of successfully populated stats,
not the nparams supplied by the user.

src/util/vircgroup.c

index b881c8c2b160febe9565ac65691b267226056a57..1ff3dadb9c99eec50ab7d9a83ac6e6ae0b7aa120 100644 (file)
@@ -2897,7 +2897,7 @@ virCgroupGetPercpuStats(virCgroupPtr group,
             goto cleanup;
     }
 
-    rv = nparams;
+    rv = param_idx + 1;
 
  cleanup:
     VIR_FREE(buf);