diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-04-01 20:36:05 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-04-01 20:36:05 +0100 |
| commit | 2d69d45e26a0156cbafdff76c97ddb54cfe3f9e4 (patch) | |
| tree | 47a50b557812e7c38a7b886c5c3b52d5b8251d3d /util/libreboot-utils/lib/rand.c | |
| parent | 6b67e124286c078afa83c05391b29a8ae672d85d (diff) | |
remove dead code
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/lib/rand.c')
| -rw-r--r-- | util/libreboot-utils/lib/rand.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/util/libreboot-utils/lib/rand.c b/util/libreboot-utils/lib/rand.c index 153798f6..bf090b43 100644 --- a/util/libreboot-utils/lib/rand.c +++ b/util/libreboot-utils/lib/rand.c @@ -156,24 +156,24 @@ retry_rand: { #if defined(USE_URANDOM) && \ ((USE_URANDOM) > 0) - ssize_t rc; + ssize_t rval; int fd = -1; open_file_on_eintr("/dev/urandom", &fd, O_RDONLY, 0400, NULL); while (rw_retry(saved_errno, - rc = rw(fd, (unsigned char *)buf + off, n - off, 0, IO_READ))); + rval = rw(fd, (unsigned char *)buf + off, n - off, 0, IO_READ))); #elif defined(__linux__) - long rc; + long rval; while (sys_retry(saved_errno, - rc = syscall(SYS_getrandom, + rval = syscall(SYS_getrandom, (unsigned char *)buf + off, n - off, 0))); #else #error Unsupported operating system (possibly unsecure randomisation) #endif - if (rc < 0 || /* syscall fehler */ - rc == 0) { /* prevent infinite loop on fatal err */ + if (rval < 0 || /* syscall fehler */ + rval == 0) { /* prevent infinite loop on fatal err */ #if defined(USE_URANDOM) && \ ((USE_URANDOM) > 0) xclose(&fd); @@ -181,7 +181,7 @@ retry_rand: { goto err; } - if ((off += (size_t)rc) < n) + if ((off += (size_t)rval) < n) goto retry_rand; #if defined(USE_URANDOM) && \ |
