summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2022-09-12 04:26:38 +0000
committertb <>2022-09-12 04:26:38 +0000
commit308516583d9bcceb2653161171539ffc037fb1eb (patch)
tree4ce5c387c3336bc3d7995eed4770617315518b85 /src
parent9ff3a3d35a765a09a700f1ec8c847b4b9185a007 (diff)
downloadopenbsd-308516583d9bcceb2653161171539ffc037fb1eb.tar.gz
openbsd-308516583d9bcceb2653161171539ffc037fb1eb.tar.bz2
openbsd-308516583d9bcceb2653161171539ffc037fb1eb.zip
Move division by two out of sizeof()
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/rc4/rc4_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/rc4/rc4_test.c b/src/regress/lib/libcrypto/rc4/rc4_test.c
index 49da63540f..4f5ea62606 100644
--- a/src/regress/lib/libcrypto/rc4/rc4_test.c
+++ b/src/regress/lib/libcrypto/rc4/rc4_test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rc4_test.c,v 1.4 2022/09/07 21:17:32 tb Exp $ */ 1/* $OpenBSD: rc4_test.c,v 1.5 2022/09/12 04:26:38 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2022 Joshua Sing <joshua@hypera.dev> 3 * Copyright (c) 2022 Joshua Sing <joshua@hypera.dev>
4 * 4 *
@@ -377,7 +377,7 @@ rc4_test(void)
377 } 377 }
378 378
379 for (j = 0; j < rt->len;) { 379 for (j = 0; j < rt->len;) {
380 in_len = arc4random_uniform(sizeof(rt->len / 2)); 380 in_len = arc4random_uniform(sizeof(rt->len) / 2);
381 if (in_len > rt->len - j) 381 if (in_len > rt->len - j)
382 in_len = rt->len - j; 382 in_len = rt->len - j;
383 383
@@ -423,7 +423,7 @@ rc4_test(void)
423 } 423 }
424 424
425 for (j = 0; j < rt->len;) { 425 for (j = 0; j < rt->len;) {
426 in_len = arc4random_uniform(sizeof(rt->len / 2)); 426 in_len = arc4random_uniform(sizeof(rt->len) / 2);
427 if (in_len > rt->len - j) 427 if (in_len > rt->len - j)
428 in_len = rt->len - j; 428 in_len = rt->len - j;
429 429