summaryrefslogtreecommitdiff
path: root/extra/rma_reset
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2022-06-17 17:15:14 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-06 22:04:35 +0000
commit738de2b575de93f71f3a95f9294b9006f4f7b008 (patch)
tree4d95d8dcdb00843cd137bf883ef98c4723040ab7 /extra/rma_reset
parentc1415ecc5fc7ace6e91115e73b97e7034b329d2b (diff)
downloadchrome-ec-738de2b575de93f71f3a95f9294b9006f4f7b008.tar.gz
trng: Rename rand to trng_rand
The declaration for rand conflicts with the standard library declaration so rename it from "rand" to "trng_rand". This has the benefit of making it obvious when we're using the true random number generator. For consistency, this also renames init_trng/exit_trng to trng_init/trng_exit. This is a reland of commit a6b0b3554f59cc9b0c4aae9bff7dff075f2089a9. BRANCH=none BUG=b:234181908, b:237344361 TEST=./util/compare_build.sh -b all -j 120 => MATCH TEST=emerge-hatch ec-utils-test Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ic26890572cb9865275c866b65b0532c5ab029865 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3738978 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Bobby Casey <bobbycasey@google.com>
Diffstat (limited to 'extra/rma_reset')
-rw-r--r--extra/rma_reset/rma_reset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extra/rma_reset/rma_reset.c b/extra/rma_reset/rma_reset.c
index 950b1227fd..c5a4b4f647 100644
--- a/extra/rma_reset/rma_reset.c
+++ b/extra/rma_reset/rma_reset.c
@@ -97,7 +97,7 @@ static const struct option long_opts[] = {
};
void panic_assert_fail(const char *fname, int linenum);
-void rand_bytes(void *buffer, size_t len);
+void trng_rand_bytes(void *buffer, size_t len);
int safe_memcmp(const void *s1, const void *s2, size_t size);
void panic_assert_fail(const char *fname, int linenum)
@@ -120,7 +120,7 @@ int safe_memcmp(const void *s1, const void *s2, size_t size)
return result != 0;
}
-void rand_bytes(void *buffer, size_t len)
+void trng_rand_bytes(void *buffer, size_t len)
{
RAND_bytes(buffer, len);
}