+8
−15
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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>