summaryrefslogtreecommitdiff
path: root/util/cbfstool/fmd.h
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2020-09-18 16:00:40 +0200
committerFelix Held <felix-coreboot@felixheld.de>2020-09-23 13:39:14 +0000
commitc99bd4a6c991d7cd9d9cc3ffabb1a0a63e21c83f (patch)
treed7bf7c7c5788393452db75a5d29929c7fc03c74d /util/cbfstool/fmd.h
parentc521d1587c225682e9af750a38e3f6bc42af342f (diff)
downloadcoreboot-c99bd4a6c991d7cd9d9cc3ffabb1a0a63e21c83f.tar.xz
util/cbfstool/fmd: make flashmap_flags bitfield struct elements unsigned
One bit wide bitfields should always be unsigned, since they can only be either 0 or -1, but never 1 which is assigned to that bit field in some cases. Making this unsigned allows it to have the values 0 or 1 which is what we want there. BUG=b:157068645 BRANCH=zork Change-Id: I99c236df583528848b455ef424504e6c2a33c5d6 Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45593 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'util/cbfstool/fmd.h')
-rw-r--r--util/cbfstool/fmd.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/cbfstool/fmd.h b/util/cbfstool/fmd.h
index 8dfcb3c964..18463ff6d1 100644
--- a/util/cbfstool/fmd.h
+++ b/util/cbfstool/fmd.h
@@ -19,8 +19,8 @@
*/
union flashmap_flags {
struct {
- int cbfs: 1; /* The section contains a CBFS area. */
- int preserve: 1; /* Preserve the section before update. */
+ unsigned int cbfs: 1; /* The section contains a CBFS area. */
+ unsigned int preserve: 1; /* Preserve the section before update. */
} f;
int v;
};