chiark / gitweb /
boot-efi: Remove superfluous assignment
authorStefan Beller <stefanbeller@googlemail.com>
Mon, 30 Dec 2013 22:32:22 +0000 (23:32 +0100)
committerKay Sievers <kay@vrfy.org>
Tue, 31 Dec 2013 16:53:30 +0000 (17:53 +0100)
2 lines after the changed line we assign err to efi_get_variable(...)
unconditionally, so it makes no sense to initialize it to some value.

src/boot/boot-efi.c

index 33840b6864e83820be915dca43e6f9384988c2e5..1c80126cc5eed1fc7d12aaec15586b426e95cf57 100644 (file)
@@ -95,7 +95,7 @@ static int find_active_entry(struct boot_info *info) {
         void *buf;
         size_t l;
         size_t i;
-        int err = -ENOENT;
+        int err;
 
         err = efi_get_variable(EFI_VENDOR_GLOBAL, "BootCurrent", NULL, &buf, &l);
         if (err < 0)