From 2044bf32d395d438f532ba91295b35b3d7cadf9a Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 6 Apr 2023 20:57:00 +0100 Subject: util/nvmutil: remove unnecessary else statement --- util/nvmutil/nvmutil.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'util') 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]) -- cgit v1.2.1