summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-04-06 20:57:00 +0100
committerLeah Rowe <leah@libreboot.org>2023-04-06 20:57:00 +0100
commit2044bf32d395d438f532ba91295b35b3d7cadf9a (patch)
treebc20c89275ff772830f767e9e65e7f3523e9494d
parent2356f89f27bd8429dbf7aa6a221415189035fc5b (diff)
util/nvmutil: remove unnecessary else statement
-rw-r--r--util/nvmutil/nvmutil.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 4303337e..a301c9da 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -387,12 +387,10 @@ byteswap(int n, int partnum)
void
writeGbeFile(int *fd, const char *filename)
{
- int p, nw;
+ int p, nw = SIZE_4KB; /* copy/swap need all 4KB written */
errno = 0;
- if ((gbe[0] != gbe[1]) && (gbe[0] < gbe[1]))
+ if ((gbe[0] != gbe[1]) && (gbe[0] < gbe[1])) /* not copy/swap */
nw = 128; /* speedhack: write only the nvm part */
- else
- nw = SIZE_4KB; /* copy/swap, so only write everything */
for (p = 0; p < 2; p++) {
if (gbe[0] > gbe[1])