From f4ce5a285167e7656037096f77f04ab80a010453 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 14 Jan 2017 13:00:55 -0800 Subject: Windows TCP now working. There are lots of changes here, mostly stuff we did in support of Windows TCP. However, there are some bugs that were fixed, and we added some new error codes, and generalized the handling of some failures during accept. Windows IPC (NamedPipes) is still missing. --- src/platform/windows/win_rand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/platform/windows/win_rand.c') diff --git a/src/platform/windows/win_rand.c b/src/platform/windows/win_rand.c index 1cabb6a0..8bca5927 100644 --- a/src/platform/windows/win_rand.c +++ b/src/platform/windows/win_rand.c @@ -17,13 +17,14 @@ void nni_plat_seed_prng(void *buf, size_t bufsz) { unsigned val; + // The rand_s routine uses RtlGenRandom to get high quality // pseudo random numbers (i.e. numbers that should be good enough // for use with crypto keying.) while (bufsz > sizeof (val)) { rand_s(&val); memcpy(buf, &val, sizeof (val)); - buf = (((char *)buf) + sizeof (val)); + buf = (((char *) buf) + sizeof (val)); bufsz -= sizeof (val); } } -- cgit v1.2.3-70-g09d2