diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-06 18:25:24 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-06 18:25:24 +0000 |
| commit | 58b17c98fdef1ded74c1028329cf88753157f4b7 (patch) | |
| tree | 49a1ed08f548e998e130eca8adbff7925701fbfd /util/nvmutil | |
| parent | c8bd98c8a6526a3d0170caf1420f67a6fd01f047 (diff) | |
util/nvmutil: minor cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index bb298d70..457f6d00 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -93,7 +93,7 @@ static void set_err(int); #define GBE_PART_SIZE (GBE_FILE_SIZE >> 1) #define NVM_CHECKSUM 0xBABA #define NVM_SIZE 128 -#define NVM_WORDS (NVM_SIZE / 2) +#define NVM_WORDS (NVM_SIZE >> 1) #define NVM_CHECKSUM_WORD (NVM_WORDS - 1) /* @@ -753,7 +753,7 @@ check_bound(size_t c, int p) if (p != 0 && p != 1) err(EINVAL, "check_bound: invalid partnum %d", p); - if (c >= (NVM_SIZE >> 1)) + if (c >= NVM_WORDS) err(EINVAL, "check_bound: out of bounds %zu", c); } |
