summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2015-02-18 01:00:07 +0000
committerSimon Horman <horms@verge.net.au>2015-02-18 16:26:34 -0500
commit5a7380559732ae1e776346d9d7c5db0f21c4b358 (patch)
treed8daabcb578c834c43eb03dac4d1ddc7fddca80c
parentfe781d9317e2592c08850b971f453ce4d4734279 (diff)
kexec: Fix compiler ambiguous else warning
Add braces to if statments in fs2dt.c. Fixes warnings like these when compiling with gcc 4.9.1: kexec/fs2dt.c: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses] Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/fs2dt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
index 3b4432d..fa7b550 100644
--- a/kexec/fs2dt.c
+++ b/kexec/fs2dt.c
@@ -122,16 +122,17 @@ static void checkprop(char *name, unsigned *data, int len)
else if (!strcmp(name, "rtas-size") ||
!strcmp(name, "linux,tce-size"))
size = be32_to_cpu(*data);
- else if (reuse_initrd && !strcmp(name, "linux,initrd-start"))
+ else if (reuse_initrd && !strcmp(name, "linux,initrd-start")) {
if (len == 8)
base = be64_to_cpu(*(unsigned long long *) data);
else
base = be32_to_cpu(*data);
- else if (reuse_initrd && !strcmp(name, "linux,initrd-end"))
+ } else if (reuse_initrd && !strcmp(name, "linux,initrd-end")) {
if (len == 8)
end = be64_to_cpu(*(unsigned long long *) data);
else
end = be32_to_cpu(*data);
+ }
if (size && end)
die("unrecoverable error: size and end set at same time\n");