From 7eb6f563b65cc35d34012b1d52d5a3d86ef70d28 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Sat, 5 Mar 2016 09:04:19 +0000 Subject: [PATCH] Added some comments, cleaned up included headers. FossilOrigin-Name: 945b2ad1e10ea3aaa5ab251c7125a4f5e12cf82e32ce5f096caf5a1c51be8c8c --- src/cw/cw_rand.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cw/cw_rand.c b/src/cw/cw_rand.c index f91974c6..044da35d 100644 --- a/src/cw/cw_rand.c +++ b/src/cw/cw_rand.c @@ -22,12 +22,13 @@ #include #include #include +#include #include #include #include -#include "cw_util.h" +#include "rand.h" #include "log.h" char *cw_rand_dev = "/dev/random"; @@ -57,7 +58,12 @@ int cw_rand_r(uint8_t * dst, int len) } - +/** + * Generate random bytes + * @param dst Destination where to store random bytes + * @param len Number of bytes to generate + * @return Number of generated bytes + */ int cw_rand(uint8_t * dst, int len) { static uint32_t rinit = 0;