]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-repolist.c
ui-repolist: sort null values last
[ps-cgit] / ui-repolist.c
index 0de328b206ae34884b5cfb2209e9a0ee40b85706..cf27cb3072a2cca564bac95f733fe5bfe489f901 100644 (file)
@@ -116,9 +116,9 @@ static int cmp(const char *s1, const char *s2)
        if (s1 && s2)
                return strcmp(s1, s2);
        if (s1 && !s2)
-               return 1;
-       if (s2 && !s1)
                return -1;
+       if (s2 && !s1)
+               return 1;
        return 0;
 }