diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2021-02-01 23:31:47 +0100 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2021-02-02 22:03:35 +0100 |
commit | 258f0970f96d44057cd456bb3b9fb2c9114030f2 (patch) | |
tree | c1fc567a0663d89481bfcf817a8321abaf36bea0 /src/boot/efi/util.c | |
parent | boot: Add efivar_get_boolean_u8() (diff) | |
download | systemd-258f0970f96d44057cd456bb3b9fb2c9114030f2.tar.xz systemd-258f0970f96d44057cd456bb3b9fb2c9114030f2.zip |
boot: Tighten scope of variables used in loops
Diffstat (limited to '')
-rw-r--r-- | src/boot/efi/util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/boot/efi/util.c b/src/boot/efi/util.c index 9019cd7a25..0d057d809d 100644 --- a/src/boot/efi/util.c +++ b/src/boot/efi/util.c @@ -193,7 +193,6 @@ VOID efivar_set_time_usec(const EFI_GUID *vendor, CHAR16 *name, UINT64 usec) { static INTN utf8_to_16(CHAR8 *stra, CHAR16 *c) { CHAR16 unichar; UINTN len; - UINTN i; if (!(stra[0] & 0x80)) len = 1; @@ -231,7 +230,7 @@ static INTN utf8_to_16(CHAR8 *stra, CHAR16 *c) { break; } - for (i = 1; i < len; i++) { + for (UINTN i = 1; i < len; i++) { if ((stra[i] & 0xc0) != 0x80) return -1; unichar <<= 6; |