diff options
| -rw-r--r-- | util/libreboot-utils/include/common.h | 4 | ||||
| -rw-r--r-- | util/libreboot-utils/lib/rand.c | 8 | ||||
| -rw-r--r-- | util/libreboot-utils/lottery.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/util/libreboot-utils/include/common.h b/util/libreboot-utils/include/common.h index abd153be..b5b251d3 100644 --- a/util/libreboot-utils/include/common.h +++ b/util/libreboot-utils/include/common.h @@ -396,9 +396,9 @@ int dcat(const char *s, size_t n, unsigned short hextonum(char ch_s); void spew_hex(const void *data, size_t len); -void *mkrbuf(size_t n); +void *rmalloc(size_t n); void rset(void *buf, size_t n); -void *mkrbuf(size_t n); +void *rmalloc(size_t n); char *mkrstr(size_t n); size_t rsize(size_t n); diff --git a/util/libreboot-utils/lib/rand.c b/util/libreboot-utils/lib/rand.c index 9edc8a5b..2cb0f56d 100644 --- a/util/libreboot-utils/lib/rand.c +++ b/util/libreboot-utils/lib/rand.c @@ -92,12 +92,12 @@ mkrstr(size_t n) /* emulates spkmodem-decode */ size_t i; if (n == 0) - err_exit(EPERM, "mkrbuf: zero-byte request"); + err_exit(EPERM, "rmalloc: zero-byte request"); if (n >= SIZE_MAX - 1) - err_exit(EOVERFLOW, "mkrbuf: overflow"); + err_exit(EOVERFLOW, "rmalloc: overflow"); - if (if_err((s = mkrbuf(n + 1)) == NULL, EFAULT)) + if (if_err((s = rmalloc(n + 1)) == NULL, EFAULT)) err_exit(EFAULT, "mkrstr: null"); for (i = 0; i < n; i++) @@ -110,7 +110,7 @@ mkrstr(size_t n) /* emulates spkmodem-decode */ } void * -mkrbuf(size_t n) +rmalloc(size_t n) { void *buf = NULL; rset(vmalloc(&buf, n), n); diff --git a/util/libreboot-utils/lottery.c b/util/libreboot-utils/lottery.c index 0b3719a4..87637123 100644 --- a/util/libreboot-utils/lottery.c +++ b/util/libreboot-utils/lottery.c @@ -27,7 +27,7 @@ main(int argc, char **argv) /* https://man.openbsd.org/pledge.2 */ xpledgex("stdio", NULL); - buf = mkrbuf(BUFSIZ); + buf = rmalloc(BUFSIZ); if (!memcmp(buf, buf + (BUFSIZ >> 1), BUFSIZ >> 1)) same = 1; |
