summaryrefslogtreecommitdiffstats
path: root/discover/boot.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-04-16 16:07:33 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-04-29 12:42:23 +1000
commit359f12f9eb0440294a8be1b78ade1b69926d2896 (patch)
tree37183f98898f324ddb3e29985abd7faf0dd81c4e /discover/boot.c
parent7acd3374490fd4fe035edcbd2c1393961e6090db (diff)
downloadtalos-petitboot-359f12f9eb0440294a8be1b78ade1b69926d2896.tar.gz
talos-petitboot-359f12f9eb0440294a8be1b78ade1b69926d2896.zip
discover: Fix potentially-unused var warning
discover/boot.c: In function ‘boot’: discover/boot.c:153:13: error: ‘local_initrd’ may be used uninitialized in this function [-Werror=maybe-uninitialized] Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/boot.c')
-rw-r--r--discover/boot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/discover/boot.c b/discover/boot.c
index 02618cc..e67ed00 100644
--- a/discover/boot.c
+++ b/discover/boot.c
@@ -103,6 +103,7 @@ int boot(void *ctx, struct boot_option *opt, struct boot_command *cmd,
char *image, *initrd, *args;
int result;
+ local_initrd = NULL;
image = NULL;
initrd = NULL;
args = NULL;
@@ -134,7 +135,6 @@ int boot(void *ctx, struct boot_option *opt, struct boot_command *cmd,
if (!local_image)
goto no_load;
- local_initrd = NULL;
if (initrd) {
local_initrd = load_file(NULL, initrd, &clean_initrd);
if (!local_initrd)
OpenPOWER on IntegriCloud