summaryrefslogtreecommitdiff
path: root/util/cbfstool
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2016-11-14 11:19:30 -0800
committerPatrick Georgi <pgeorgi@google.com>2017-01-04 21:37:39 +0100
commitcf84619dd66789454b14a1dccb7b6c11cbb5e80a (patch)
tree1d51eaf0caf1a27c68c6c9dd327b75f2c1442836 /util/cbfstool
parent4aeb2394e92b4bb1c9afc369ee482ff0c09c2a02 (diff)
util/cbfstool: Fix to build with latest llvm
cbfs-payload-linux.c:255:43: note: add parentheses around left hand side expression to silence this warning if ((hdr->protocol_version >= 0x200) && (!hdr->loadflags & 1)) { [pg: also fix the semantics. Thanks Nico for catching this] BUG=chromium:665657 TEST=coreboot-utils builds Change-Id: I025c784330885cce8ae43c44f9d938394af30ed5 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 35c4935f2a89c3d3b45213372bcf0474a60eda43 Original-Change-Id: I8758e7d158ca32e87107797f2a33b9d9a0e4676f Original-Reviewed-on: https://chromium-review.googlesource.com/411335 Original-Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Original-Tested-by: Manoj Gupta <manojgupta@chromium.org> Original-Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://review.coreboot.org/17568 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'util/cbfstool')
-rw-r--r--util/cbfstool/cbfs-payload-linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/cbfstool/cbfs-payload-linux.c b/util/cbfstool/cbfs-payload-linux.c
index afb0f3ac71..6b4bf27b85 100644
--- a/util/cbfstool/cbfs-payload-linux.c
+++ b/util/cbfstool/cbfs-payload-linux.c
@@ -252,7 +252,7 @@ int parse_bzImage_to_payload(const struct buffer *input,
}
unsigned long kernel_base = 0x100000;
- if ((hdr->protocol_version >= 0x200) && (!hdr->loadflags & 1)) {
+ if ((hdr->protocol_version < 0x200) || !(hdr->loadflags & 1)) {
kernel_base = 0x1000; /* zImage kernel */
}
/* kernel prefers an address, so listen */