Commit c11f2f5d authored by Jesse Natalie's avatar Jesse Natalie Committed by Marge Bot

microsoft/compiler: Fix tautological comparison

Clang detects that a signed character can't be >= 128. Instead,
we should just explicitly check for the 8th bit via bitmask compare.
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Part-of: <mesa/mesa!8248>
parent f0eda8fb
......@@ -185,7 +185,7 @@ static bool
is_char7_string(const char *str)
{
while (*str != '\0') {
if (*str++ >= 128)
if (*str++ & 0x80)
return false;
}
return true;
......
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