Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Tested-by: Stefan Raspl <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
- Loading branch information