mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-16 13:16:47 +02:00
util/nvmutil: rename variable in hextonum
This commit is contained in:
@@ -217,7 +217,7 @@ uint8_t
|
|||||||
hextonum(char chs)
|
hextonum(char chs)
|
||||||
{
|
{
|
||||||
uint8_t val8, ch;
|
uint8_t val8, ch;
|
||||||
static int macfd = -1;
|
static int rfd = -1;
|
||||||
static uint8_t *rbuf = NULL;
|
static uint8_t *rbuf = NULL;
|
||||||
static size_t rindex = BUFSIZ;
|
static size_t rindex = BUFSIZ;
|
||||||
|
|
||||||
@@ -226,11 +226,11 @@ hextonum(char chs)
|
|||||||
if (rbuf == NULL)
|
if (rbuf == NULL)
|
||||||
if ((rbuf = (uint8_t *) malloc(BUFSIZ)) == NULL)
|
if ((rbuf = (uint8_t *) malloc(BUFSIZ)) == NULL)
|
||||||
err(1, NULL);
|
err(1, NULL);
|
||||||
if ((macfd != -1)) {
|
if ((rfd != -1)) {
|
||||||
close(macfd);
|
close(rfd);
|
||||||
macfd = -1;
|
rfd = -1;
|
||||||
}
|
}
|
||||||
if (readFromFile(&macfd, rbuf, "/dev/urandom", O_RDONLY,
|
if (readFromFile(&rfd, rbuf, "/dev/urandom", O_RDONLY,
|
||||||
BUFSIZ) != BUFSIZ) {
|
BUFSIZ) != BUFSIZ) {
|
||||||
warn("%s", "/dev/urandom");
|
warn("%s", "/dev/urandom");
|
||||||
return 16;
|
return 16;
|
||||||
|
|||||||
Reference in New Issue
Block a user