summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-09 05:31:51 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-09 05:31:51 +0000
commite092b2ce0bcbcce7e11628963b93ac4b47dd463a (patch)
tree72854a0f757f4f92d9cd97e42504934a892bc624
parent3b73ea4288a8aee203bbf8e0b24e5452962c7f8c (diff)
util/nvmutil: explicit cast in nvm_word
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/nvmutil/nvmutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 3a5148ff..32fafa59 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -1108,7 +1108,7 @@ nvm_word(size_t pos16, size_t p)
check_nvm_bound(pos16, p);
pos = (pos16 << 1) + (p * GBE_PART_SIZE);
- return buf[pos] | (buf[pos + 1] << 8);
+ return (uint16_t)buf[pos] | (uint16_t)(buf[pos + 1] << 8);
}
static void