diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2022-09-12 04:26:39 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2022-09-12 04:26:39 +0000 |
commit | 7600a3dab38812dc80bba4356322107618a4746e (patch) | |
tree | 5423fc95c2b012095f58a31a4aa240221af94cbe | |
parent | b445ddf14984e4c281f531e86afca78be3d18e29 (diff) |
Move division by two out of sizeof()
-rw-r--r-- | regress/lib/libcrypto/rc4/rc4_test.c | 6 |
1 files 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 <joshua@hypera.dev> * @@ -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; |