util/nvmutil: simplify setWord() with word() macro

There is nothing cooler than a macro.

Signed-off-by: Leah Rowe <leah@libreboot.org>
fsdg20230625
Leah Rowe 2023-06-01 07:31:16 +01:00
parent 7ab209d545
commit 6885200c8b
1 changed files with 2 additions and 4 deletions

View File

@ -327,10 +327,8 @@ void
setWord(int pos16, int partnum, uint16_t val16)
{
gbeFileModified = 1;
if (word(pos16, partnum) == val16)
return;
buf16[pos16 + (partnum << 11)] = val16;
nvmPartModified[partnum] = 1;
if (word(pos16, partnum) != val16)
nvmPartModified[partnum] = 1 | (word(pos16, partnum) = val16);
}
void