Prefer structure assignment over memcpy.
Found by cocci/struct_assign.cocci

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 app/test/test_cryptodev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 441ecc6ad5..50518dc5c6 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -14837,8 +14837,7 @@ test_multi_session_random_usage(void)
 
        for (i = 0; i < MB_SESSION_NUMBER; i++) {
 
-               rte_memcpy(&ut_paramz[i].ut_params, &unittest_params,
-                               sizeof(struct crypto_unittest_params));
+               ut_paramz[i].ut_params = unittest_params;
 
                test_AES_CBC_HMAC_SHA512_decrypt_create_session_params(
                                &ut_paramz[i].ut_params,
-- 
2.47.2

Reply via email to