mirror of
https://github.com/git-for-windows/git.git
synced 2025-12-13 00:06:03 -06:00
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>
This commit is contained in:
parent
6e9e91e9ca
commit
3063477445
2
path.c
2
path.c
@ -1368,7 +1368,7 @@ only_spaces_and_periods:
|
|||||||
saw_tilde = 1;
|
saw_tilde = 1;
|
||||||
} else if (i >= 6)
|
} else if (i >= 6)
|
||||||
return 0;
|
return 0;
|
||||||
else if (name[i] < 0) {
|
else if (name[i] & 0x80) {
|
||||||
/*
|
/*
|
||||||
* We know our needles contain only ASCII, so we clamp
|
* We know our needles contain only ASCII, so we clamp
|
||||||
* here to make the results of tolower() sane.
|
* here to make the results of tolower() sane.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user