mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
nvmutil: simplify readGbe and writeGbe
the for loop only contains one line Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -223,10 +223,9 @@ nvmalloc(void)
|
||||
void
|
||||
readGbe(void)
|
||||
{
|
||||
for (int p = 0; p < 2; p++) {
|
||||
for (int p = 0; p < 2; p++)
|
||||
if (do_read[p])
|
||||
readGbe_part(p);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -428,10 +427,9 @@ goodChecksum(int partnum)
|
||||
void
|
||||
writeGbe(void)
|
||||
{
|
||||
for (int p = 0; p < 2; p++) {
|
||||
for (int p = 0; p < 2; p++)
|
||||
if ((nvmPartChanged[p]) && (flags != O_RDONLY))
|
||||
writeGbe_part(p);
|
||||
}
|
||||
err_if(close(fd) == -1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user