diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-08 21:03:06 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-08 21:03:06 +0000 |
| commit | c425c74c54b02d4f0059888802782e72eabd3957 (patch) | |
| tree | bed4f4c4876eb7b1d9dac156370a151234ed7c2c | |
| parent | 6abc150e89f890f20ec4c3fd7835bfeecd4fed3d (diff) | |
util/nvmutil: improved clarity on checksum check
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | util/nvmutil/nvmutil.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 7216382e..1cf4c1af 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -696,6 +696,7 @@ static void read_checksums(void) { size_t p; + size_t skip_part; uint8_t invert; uint8_t arg_part; uint8_t num_invalid; @@ -718,7 +719,8 @@ read_checksums(void) /* * Only verify a part if it was *read* */ - if (arg_part && (p == (part ^ 1 ^ invert))) + skip_part = part ^ 1 ^ invert; + if (arg_part && (p == skip_part)) continue; if (!good_checksum(p)) |
