From 7bd45c7fecfc98385e21610cf4e9b04381854a5a Mon Sep 17 00:00:00 2001 From: tb Date: Mon, 12 Sep 2022 04:26:38 +0000 Subject: [PATCH] Move division by two out of sizeof() --- regress/lib/libcrypto/rc4/rc4_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/regress/lib/libcrypto/rc4/rc4_test.c b/regress/lib/libcrypto/rc4/rc4_test.c index 49da63540ff..4f5ea62606e 100644 --- a/regress/lib/libcrypto/rc4/rc4_test.c +++ b/regress/lib/libcrypto/rc4/rc4_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rc4_test.c,v 1.4 2022/09/07 21:17:32 tb Exp $ */ +/* $OpenBSD: rc4_test.c,v 1.5 2022/09/12 04:26:38 tb Exp $ */ /* * Copyright (c) 2022 Joshua Sing * @@ -377,7 +377,7 @@ rc4_test(void) } for (j = 0; j < rt->len;) { - in_len = arc4random_uniform(sizeof(rt->len / 2)); + in_len = arc4random_uniform(sizeof(rt->len) / 2); if (in_len > rt->len - j) in_len = rt->len - j; @@ -423,7 +423,7 @@ rc4_test(void) } for (j = 0; j < rt->len;) { - in_len = arc4random_uniform(sizeof(rt->len / 2)); + in_len = arc4random_uniform(sizeof(rt->len) / 2); if (in_len > rt->len - j) in_len = rt->len - j; -- 2.20.1