diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-04-24 16:39:35 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-04-24 16:39:35 -0700 |
| commit | d35973833e6bf05fec29100a4d5e66bb07b06659 (patch) | |
| tree | b380e99a092a0229c8f087d231306b398f6f43f2 /src/core/random.c | |
| parent | 007f74b1053c9406340ffa728f9c254ba37e2a6c (diff) | |
| download | nng-d35973833e6bf05fec29100a4d5e66bb07b06659.tar.gz nng-d35973833e6bf05fec29100a4d5e66bb07b06659.tar.bz2 nng-d35973833e6bf05fec29100a4d5e66bb07b06659.zip | |
fix a number of cppcheck complaints (not all)
Diffstat (limited to 'src/core/random.c')
| -rw-r--r-- | src/core/random.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/random.c b/src/core/random.c index febd0848..2d899f21 100644 --- a/src/core/random.c +++ b/src/core/random.c @@ -1,5 +1,6 @@ // -// Copyright 2017 Garrett D'Amore <garrett@damore.org> +// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -37,13 +38,12 @@ typedef struct { static void nni_isaac(nni_isaac_ctx *ctx) { - register uint32_t i, x, y; - ctx->cc++; // cc incremented once per 256 results ctx->bb += ctx->cc; // then combined with bb - for (i = 0; i < 256; ++i) { - x = ctx->mm[i]; + for (uint32_t i = 0; i < 256; ++i) { + uint32_t x = ctx->mm[i]; + uint32_t y; switch (i % 4) { case 0: ctx->aa ^= (ctx->aa << 13); |
