From: Yu Watanabe Date: Fri, 31 Jan 2020 10:20:34 +0000 (+0900) Subject: sd-boot: fix warning about comparison is always true X-Git-Tag: v245-rc1~36^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a614aa1985d60519de120660cc7379c69690a3bd;p=thirdparty%2Fsystemd.git sd-boot: fix warning about comparison is always true --- diff --git a/src/boot/efi/util.c b/src/boot/efi/util.c index da743dcb9f2..b44f051d95d 100644 --- a/src/boot/efi/util.c +++ b/src/boot/efi/util.c @@ -189,7 +189,7 @@ static INTN utf8_to_16(CHAR8 *stra, CHAR16 *c) { UINTN len; UINTN i; - if (stra[0] < 0x80) + if (!(stra[0] & 0x80)) len = 1; else if ((stra[0] & 0xe0) == 0xc0) len = 2;