shared/bootspec: look at the correct variable
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 8 Mar 2018 09:06:00 +0000 (10:06 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 8 Mar 2018 11:06:14 +0000 (12:06 +0100)
The result of this parsing isn't used for anything, so this didn't cause a
functional difference, but a spurious warning was emitted.

src/shared/bootspec.c

index 7bb66f3..2e36118 100644 (file)
@@ -202,11 +202,11 @@ int boot_loader_read_conf(const char *path, BootConfig *config) {
                         r = free_and_strdup(&config->timeout, p);
                 else if (streq(field, "editor"))
                         r = free_and_strdup(&config->editor, p);
-                else if (streq(buf, "auto-entries"))
+                else if (streq(field, "auto-entries"))
                         r = free_and_strdup(&config->auto_entries, p);
-                else if (streq(buf, "auto-firmware"))
+                else if (streq(field, "auto-firmware"))
                         r = free_and_strdup(&config->auto_firmware, p);
-                else if (streq(buf, "console-mode"))
+                else if (streq(field, "console-mode"))
                         r = free_and_strdup(&config->console_mode, p);
                 else {
                         log_notice("%s:%u: Unknown line \"%s\"", path, line, field);