mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-04 04:49:18 +00:00
Fix some warnings
This commit is contained in:
parent
e3b4a47c1e
commit
c9b18018fd
15
src/util.c
15
src/util.c
@ -283,17 +283,14 @@ int git__strcasesort_cmp(const char *a, const char *b)
|
||||
{
|
||||
int cmp = 0;
|
||||
|
||||
const char *orig_a = a;
|
||||
const char *orig_b = b;
|
||||
|
||||
while (*a && *b) {
|
||||
if (*a == *b)
|
||||
;
|
||||
else if (tolower(*a) == tolower(*b)) {
|
||||
if (*a != *b) {
|
||||
if (tolower(*a) != tolower(*b))
|
||||
break;
|
||||
/* use case in sort order even if not in equivalence */
|
||||
if (!cmp)
|
||||
cmp = (int)(*(const unsigned char *)a) - (int)(*(const unsigned char *)b);
|
||||
} else
|
||||
break;
|
||||
cmp = (int)(*(const uint8_t *)a) - (int)(*(const uint8_t *)b);
|
||||
}
|
||||
|
||||
++a, ++b;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user