From 9e5736baa900b0baf8af17064e9e05973ad3cabc Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 6 Mar 2026 23:56:19 +0000 Subject: 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 --- util/nvmutil/nvmutil.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'util/nvmutil') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 62949c22..07d2b938 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -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[]) { -- cgit v1.2.1