path.c: char is not (always) signed

If a "char" in C is signed or unsigned is not specified, because it is out of tradition "implementation dependent". Therefore constructs like "if (name[i] < 0)" are not portable, use "if (name[i] & 0x80)" instead. Detected by "gcc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516" when setting DEVELOPER = 1 DEVOPTS = extra-all Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Torsten Bögershausen committed Oct 25, 2018 at 18:13 UTC 3063477445423fd5ec52efa073fb8d15c1641f4e
1 file changed +1 -1
path.c
+1 -1
@@ -1368,7 +1368,7 @@ only_spaces_and_periods:
1368 saw_tilde = 1;
1369 } else if (i >= 6)
1370 return 0;
1371 - else if (name[i] < 0) {
1371 + else if (name[i] & 0x80) {
1372 /*
1373 * We know our needles contain only ASCII, so we clamp
1374 * here to make the results of tolower() sane.