From: tb Date: Mon, 12 Sep 2022 04:12:39 +0000 (+0000) Subject: Move division by two out of sizeof() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=08fd9a741ad85f9378f7de4b4bc40aff897574a7;p=openbsd Move division by two out of sizeof() CID 356778 --- diff --git a/regress/lib/libcrypto/rc2/rc2_test.c b/regress/lib/libcrypto/rc2/rc2_test.c index 9ec1df0a8a7..a36dfb646ff 100644 --- a/regress/lib/libcrypto/rc2/rc2_test.c +++ b/regress/lib/libcrypto/rc2/rc2_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rc2_test.c,v 1.2 2022/09/07 21:25:21 tb Exp $ */ +/* $OpenBSD: rc2_test.c,v 1.3 2022/09/12 04:12:39 tb Exp $ */ /* * Copyright (c) 2022 Joshua Sing * @@ -312,7 +312,7 @@ rc2_evp_test(size_t test_number, const struct rc2_test *rt, const char *label, c } for (i = 0; i < rt->len;) { - in_len = arc4random_uniform(sizeof(rt->len / 2)); + in_len = arc4random_uniform(sizeof(rt->len) / 2); if (in_len > rt->len - i) in_len = rt->len - i; @@ -392,7 +392,7 @@ rc2_evp_test(size_t test_number, const struct rc2_test *rt, const char *label, c } for (i = 0; i < rt->len;) { - in_len = arc4random_uniform(sizeof(rt->len / 2)); + in_len = arc4random_uniform(sizeof(rt->len) / 2); if (in_len > rt->len - i) in_len = rt->len - i;