From 2ed8db3adc19dd922e31082634146e159f65af2e Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 18 Mar 2026 19:30:32 +0000 Subject: util/nvmutil: major cleanup handle init in xstatus() it's now a singleton design also tidied up some other code also removed todo.c. bloat. will do all those anyway. too much change. i just kept touching the code until it looked good Signed-off-by: Leah Rowe --- util/nvmutil/lib/checksum.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'util/nvmutil/lib/checksum.c') 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; -- cgit v1.2.1