util/nvmutil: remove reset_global_state

it was put there for another change i haven't done yet,
and probably won't. the program currently just runs once
with one operation, on a given file.

the current defaults are initialised just fine without
this function, so let's remove this bloat for now.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-06 23:56:19 +00:00
parent 13b35ed1fc
commit 9e5736baa9
-28
View File
@@ -27,7 +27,6 @@
#endif
#endif
static void reset_global_state(void);
static void set_cmd(int argc, char *argv[]);
static void check_cmd_args(int argc, char *argv[]);
static size_t conv_argv_part_num(const char *part_str);
@@ -161,7 +160,6 @@ main(int argc, char *argv[])
if (argc < 2)
usage();
reset_global_state();
fname = argv[1];
#ifdef __OpenBSD__
@@ -239,32 +237,6 @@ main(int argc, char *argv[])
return EXIT_SUCCESS;
}
/*
* Currently redundant, because the program only runs
* once, but I plan to expand this tool so that it can
* work on multiple files, using getop switches as args.
*/
static void
reset_global_state(void)
{
errno = 0;
mac_str = NULL;
invert = 0;
part_modified[0] = 0;
part_modified[1] = 0;
fname = "";
cmd = NULL;
gbe_fd = -1;
#ifndef HAVE_ARC4RANDOM_BUF
rfd = -1;
#endif
part = 0;
memset(mac_buf, 0, sizeof(mac_buf));
memset(buf, 0, sizeof(buf));
}
static void
set_cmd(int argc, char *argv[])
{