Simplify sort_irqs logic

This commit is contained in:
Nelson A. de Oliveira 2012-06-15 16:48:19 -03:00 committed by Neil Horman
parent c88c47ad0e
commit 37c1f6f26b

View file

@ -357,18 +357,9 @@ static gint sort_irqs(gconstpointer A, gconstpointer B)
a = (struct irq_info*)A;
b = (struct irq_info*)B;
if (a->class < b->class)
return 1;
if (a->class > b->class)
return -1;
if (a->load < b->load)
return 1;
if (a->load > b->load)
return -1;
if (a<b)
if (a->class < b->class || a->load < b->load || a < b)
return 1;
return -1;
}
void sort_irq_list(GList **list)