diff options
-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 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]) |