summaryrefslogtreecommitdiff
path: root/util/nvmutil/lib/checksum.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/nvmutil/lib/checksum.c')
-rw-r--r--util/nvmutil/lib/checksum.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/util/nvmutil/lib/checksum.c b/util/nvmutil/lib/checksum.c
index 35b88eb9..d006a106 100644
--- a/util/nvmutil/lib/checksum.c
+++ b/util/nvmutil/lib/checksum.c
@@ -29,9 +29,9 @@
void
read_checksums(void)
{
- struct xstate *x = xstatus();
- struct commands *cmd;
- struct xfile *f;
+ struct xstate *x = xstatus(0, NULL);
+ struct commands *cmd = &x->cmd[x->i];
+ struct xfile *f = &x->f;
unsigned long _p;
unsigned long _skip_part;
@@ -39,9 +39,6 @@ read_checksums(void)
unsigned char _num_invalid;
unsigned char _max_invalid;
- cmd = &x->cmd[x->i];
- f = &x->f;
-
f->part_valid[0] = 0;
f->part_valid[1] = 0;