ui-repolist: sort null values last
When sorting on e.g. owner, it's not interesting to get all repos without owner at the top of the list. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
f250c1ca2e
commit
54272e6096
@ -116,9 +116,9 @@ static int cmp(const char *s1, const char *s2)
|
|||||||
if (s1 && s2)
|
if (s1 && s2)
|
||||||
return strcmp(s1, s2);
|
return strcmp(s1, s2);
|
||||||
if (s1 && !s2)
|
if (s1 && !s2)
|
||||||
return 1;
|
|
||||||
if (s2 && !s1)
|
|
||||||
return -1;
|
return -1;
|
||||||
|
if (s2 && !s1)
|
||||||
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user