Commit c9b18018 by Russell Belfer

Fix some warnings

parent e3b4a47c
...@@ -283,17 +283,14 @@ int git__strcasesort_cmp(const char *a, const char *b) ...@@ -283,17 +283,14 @@ int git__strcasesort_cmp(const char *a, const char *b)
{ {
int cmp = 0; int cmp = 0;
const char *orig_a = a;
const char *orig_b = b;
while (*a && *b) { while (*a && *b) {
if (*a == *b) if (*a != *b) {
; if (tolower(*a) != tolower(*b))
else if (tolower(*a) == tolower(*b)) { break;
/* use case in sort order even if not in equivalence */
if (!cmp) if (!cmp)
cmp = (int)(*(const unsigned char *)a) - (int)(*(const unsigned char *)b); cmp = (int)(*(const uint8_t *)a) - (int)(*(const uint8_t *)b);
} else }
break;
++a, ++b; ++a, ++b;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment