From d35973833e6bf05fec29100a4d5e66bb07b06659 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 24 Apr 2018 16:39:35 -0700 Subject: fix a number of cppcheck complaints (not all) --- src/core/random.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/random.c') 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 +// Copyright 2018 Staysail Systems, Inc. +// Copyright 2018 Capitar IT Group BV // // 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); -- cgit v1.2.3-70-g09d2