summaryrefslogtreecommitdiff
path: root/lib/plist.c
diff options
context:
space:
mode:
authorMarc Hartmayer <mhartmay@linux.vnet.ibm.com>2018-01-09 15:27:01 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-02-24 03:43:38 +0300
commitfaa312a543283c717342cd332b5b9247bd305dce (patch)
tree412d62ec2b93c59a71bfb2c776d6930a582c3705 /lib/plist.c
parent95e057e25892eaa48cad1e2d637b80d0f1a4fac5 (diff)
downloadlinux-faa312a543283c717342cd332b5b9247bd305dce.tar.xz
tools/kvm_stat: simplify the sortkey function
The 'sortkey' function references a value in its enclosing scope (closure). This is not common practice for a sort key function so let's replace it. Additionally, the function 'sorted' has already a parameter for reversing the result therefore the inversion of the values is unneeded. The check for stats[x][1] is also superfluous as it's ensured that this value is initialized with 0. Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> Tested-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'lib/plist.c')
0 files changed, 0 insertions, 0 deletions