diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-07-10 15:02:38 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-07-10 15:02:38 -0700 |
| commit | 795aebbee77bb74d8792df96dfe1aa79ec9548fc (patch) | |
| tree | 58c16424c16b9e71cebdceaee4507ab6608f80da /src/platform/windows/win_rand.c | |
| parent | de90f97167d2df6739db47b2c6aad85f06250270 (diff) | |
| download | nng-795aebbee77bb74d8792df96dfe1aa79ec9548fc.tar.gz nng-795aebbee77bb74d8792df96dfe1aa79ec9548fc.tar.bz2 nng-795aebbee77bb74d8792df96dfe1aa79ec9548fc.zip | |
Give up on uncrustify; switch to clang-format.
Diffstat (limited to 'src/platform/windows/win_rand.c')
| -rw-r--r-- | src/platform/windows/win_rand.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/platform/windows/win_rand.c b/src/platform/windows/win_rand.c index a1e381d8..38c86572 100644 --- a/src/platform/windows/win_rand.c +++ b/src/platform/windows/win_rand.c @@ -21,18 +21,17 @@ nni_plat_seed_prng(void *buf, size_t bufsz) // 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)) { + while (bufsz > sizeof(val)) { rand_s(&val); - memcpy(buf, &val, sizeof (val)); - buf = (((char *) buf) + sizeof (val)); - bufsz -= sizeof (val); + memcpy(buf, &val, sizeof(val)); + buf = (((char *) buf) + sizeof(val)); + bufsz -= sizeof(val); } } - #else // Suppress empty symbols warnings in ranlib. int nni_win_rand_not_used = 0; -#endif // PLATFORM_WINDOWS +#endif // PLATFORM_WINDOWS |
