aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Tay <nick@windblume.net>2022-01-11 20:12:21 +1100
committerNicholas Tay <nick@windblume.net>2022-01-11 20:12:21 +1100
commit1332b7c50b4b75b848df19dd357071320c39ffa7 (patch)
tree22226edafb429d59a57fe5bedab3aa58046ec729
parent00fb165cb4bdcbe4e3f2a4d2a84e401e6df3c8f5 (diff)
downloadpassgen-1332b7c50b4b75b848df19dd357071320c39ffa7.tar.gz
passgen-1332b7c50b4b75b848df19dd357071320c39ffa7.tar.bz2
passgen-1332b7c50b4b75b848df19dd357071320c39ffa7.zip
Enforce unsigned int for RNG generation
Need this for it to work properly, I think with the mod
-rw-r--r--passgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/passgen.c b/passgen.c
index 1215d3f..aaa2e91 100644
--- a/passgen.c
+++ b/passgen.c
@@ -58,10 +58,10 @@ void init_rng(void)
#endif
}
-int get_rng(void)
+unsigned int get_rng(void)
{
#ifdef USE_GETENTROPY
- int r;
+ unsigned int r;
getentropy(&r, sizeof(r));
return r;
#else