mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-30 11:28:21 +00:00
Merge pull request #15 from dllaurence/finalize_rand
Finalize all open file descriptors
This commit is contained in:
commit
d57d030362
8
rand.c
8
rand.c
@ -33,6 +33,14 @@ void init_rand(void)
|
|||||||
f = fopen("/dev/urandom", "r");
|
f = fopen("/dev/urandom", "r");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int finalize_rand(void)
|
||||||
|
{
|
||||||
|
int err = fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t random32(void)
|
uint32_t random32(void)
|
||||||
{
|
{
|
||||||
uint32_t r;
|
uint32_t r;
|
||||||
|
Loading…
Reference in New Issue
Block a user