summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-10 10:44:27 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-10 10:44:27 +0000
commit090a702b748d7bea8ede4287ad72e56fa0e0ff19 (patch)
treed77b26b848c5f77bddf4cfaa11cf49ed64f38752 /util
parentcbd7ad13a3eb3b424ae319a2a7486fd64fed24a0 (diff)
util/nvmutil: remove unused st variable
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 3eb1cd8c..0e5d0848 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -265,6 +265,7 @@ static uint8_t pad[GBE_PART_SIZE]; /* the file that wouldn't die */
static uint16_t mac_buf[3];
static off_t gbe_file_size;
+static struct stat gbe_st;
static int urandom_fd = -1;
static int gbe_fd = -1;
static size_t part;
@@ -699,8 +700,6 @@ xstrxcmp(const char *a, const char *b, size_t maxlen)
static void
open_dev_urandom(void)
{
- struct stat st_urandom_fd;
-
rname = newrandom;
if ((urandom_fd = open(rname, O_RDONLY | O_BINARY)) != -1)
return;
@@ -715,14 +714,12 @@ open_dev_urandom(void)
errno = 0;
rname = oldrandom;
- xopen(&urandom_fd, rname, O_RDONLY | O_BINARY, &st_urandom_fd);
+ xopen(&urandom_fd, rname, O_RDONLY | O_BINARY, &gbe_st);
}
static void
open_gbe_file(void)
{
- struct stat gbe_st;
-
xopen(&gbe_fd, fname, command[cmd_index].flags | O_BINARY, &gbe_st);
gbe_file_size = gbe_st.st_size;