diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-02-23 13:34:35 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-02-23 13:34:35 +0000 |
| commit | 261c41a3c382aeb7a9a14850150418960b072747 (patch) | |
| tree | e8bd4ff49d647853ca03cfcd705ea9181d31199e /util | |
| parent | 8cf2558a6f26daf4afaf886044ce1606c90959e8 (diff) | |
nvmutil: simplify a few else statements
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 8ba669ce..4720095c 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -198,10 +198,9 @@ void nvmalloc(void) { /* same operations need the full block, others only 128 bytes */ + nf = NVM_SIZE; if ((cmd == cmd_swap) || (cmd == cmd_copy)) nf = SIZE_4KB; - else - nf = NVM_SIZE; /* only read the part specified, for copy/setchecksum/brick */ if ((cmd == cmd_copy) || (cmd == cmd_setchecksum) || (cmd == cmd_brick)) @@ -307,8 +306,7 @@ hextonum(char ch) return ch - 'a' + 10; else if ((ch == '?') || (ch == 'x') || (ch == 'X')) return rhex(); /* random hex value */ - else - return 16; /* error: invalid character */ + return 16; /* error: invalid character */ } uint8_t |
