mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-05 11:50:12 +00:00
trivial: uefi-capsule: remove an always true condition
found by codacity
This commit is contained in:
parent
dfc0254683
commit
747aeb5f8a
@ -23,10 +23,10 @@ fu_ucs2_to_uft8 (const guint16 *str, gssize max)
|
||||
for (i = 0, j = 0; i < max && str[i]; i++, j++) {
|
||||
if (str[i] <= 0x7f) {
|
||||
ret[j] = str[i];
|
||||
} else if (str[i] > 0x7f && str[i] <= 0x7ff) {
|
||||
} else if (str[i] <= 0x7ff) {
|
||||
ret[j++] = 0xc0 | ev_bits(str[i], 0x1f, 6);
|
||||
ret[j] = 0x80 | ev_bits(str[i], 0x3f, 0);
|
||||
} else if (str[i] > 0x7ff /* && str[i] < 0x10000 */ ) {
|
||||
} else {
|
||||
ret[j++] = 0xe0 | ev_bits(str[i], 0xf, 12);
|
||||
ret[j++] = 0x80 | ev_bits(str[i], 0x3f, 6);
|
||||
ret[j] = 0x80 | ev_bits(str[i], 0x3f, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user