summaryrefslogtreecommitdiff
path: root/util/nvmutil
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2022-12-03 12:17:16 +0000
committerLeah Rowe <leah@libreboot.org>2022-12-03 12:17:16 +0000
commit851892b4642d7247f7929f1f0ceef2425f463adf (patch)
treeddf18c9980cae0851ac55208cde19c035197e9b6 /util/nvmutil
parent0bf3f1ed61bb04ede8f158505b480272a40bd82e (diff)
util/nvmutil: rename variable in hextonum
Diffstat (limited to 'util/nvmutil')
-rw-r--r--util/nvmutil/nvmutil.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index fa92717a..bf06b4cd 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -217,7 +217,7 @@ uint8_t
hextonum(char chs)
{
uint8_t val8, ch;
- static int macfd = -1;
+ static int rfd = -1;
static uint8_t *rbuf = NULL;
static size_t rindex = BUFSIZ;
@@ -226,11 +226,11 @@ hextonum(char chs)
if (rbuf == NULL)
if ((rbuf = (uint8_t *) malloc(BUFSIZ)) == NULL)
err(1, NULL);
- if ((macfd != -1)) {
- close(macfd);
- macfd = -1;
+ if ((rfd != -1)) {
+ close(rfd);
+ rfd = -1;
}
- if (readFromFile(&macfd, rbuf, "/dev/urandom", O_RDONLY,
+ if (readFromFile(&rfd, rbuf, "/dev/urandom", O_RDONLY,
BUFSIZ) != BUFSIZ) {
warn("%s", "/dev/urandom");
return 16;