Commit 74e781dfec for openssl.org

commit 74e781dfece2869191d15b255216d9addc7eac76
Author: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
Date:   Sat Jul 4 11:54:56 2026 +0200

    Eliminate unnecessary type casts of int constants

    Found by running the checkpatch.pl Linux script to enforce coding style.

    Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
    Reviewed-by: Neil Horman <nhorman@openssl.org>
    Reviewed-by: Norbert Pocs <norbertp@openssl.org>
    Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
    MergeDate: Wed Jul  8 10:11:16 2026
    (Merged from https://github.com/openssl/openssl/pull/31860)

diff --git a/test/bftest.c b/test/bftest.c
index 08f974ec9b..3b6d2ee4b6 100644
--- a/test/bftest.c
+++ b/test/bftest.c
@@ -387,7 +387,7 @@ static int test_bf_cfb64(void)
     memset(cbc_out, 0, 40);
     memcpy(iv, cbc_iv, 8);
     n = 0;
-    BF_cfb64_encrypt((unsigned char *)cbc_data, cbc_out, (long)13,
+    BF_cfb64_encrypt((unsigned char *)cbc_data, cbc_out, 13,
         &key, iv, &n, BF_ENCRYPT);
     BF_cfb64_encrypt((unsigned char *)&(cbc_data[13]), &(cbc_out[13]),
         len - 13, &key, iv, &n, BF_ENCRYPT);
@@ -419,7 +419,7 @@ static int test_bf_ofb64(void)
     memset(cbc_out, 0, 40);
     memcpy(iv, cbc_iv, 8);
     n = 0;
-    BF_ofb64_encrypt((unsigned char *)cbc_data, cbc_out, (long)13, &key, iv,
+    BF_ofb64_encrypt((unsigned char *)cbc_data, cbc_out, 13, &key, iv,
         &n);
     BF_ofb64_encrypt((unsigned char *)&(cbc_data[13]), &(cbc_out[13]),
         len - 13, &key, iv, &n);
diff --git a/test/destest.c b/test/destest.c
index 26462e3b65..a5fa3b51a5 100644
--- a/test/destest.c
+++ b/test/destest.c
@@ -604,7 +604,7 @@ static int test_des_ede_cfb64(void)
         return 0;
     memcpy(cfb_tmp, cfb_iv, sizeof(cfb_iv));
     n = 0;
-    DES_ede3_cfb64_encrypt(cfb_buf1, cfb_buf2, (long)17, &ks, &ks, &ks,
+    DES_ede3_cfb64_encrypt(cfb_buf1, cfb_buf2, 17, &ks, &ks, &ks,
         &cfb_tmp, &n, DES_DECRYPT);
     DES_ede3_cfb64_encrypt(&cfb_buf1[17], &cfb_buf2[17], sizeof(plain) - 17,
         &ks, &ks, &ks, &cfb_tmp, &n, DES_DECRYPT);
diff --git a/test/ideatest.c b/test/ideatest.c
index b426429198..4ad7f67054 100644
--- a/test/ideatest.c
+++ b/test/ideatest.c
@@ -98,7 +98,7 @@ static int test_idea_cfb64(void)
     IDEA_set_decrypt_key(&eks, &dks);
     memcpy(cfb_tmp, cfb_iv, sizeof(cfb_tmp));
     n = 0;
-    IDEA_cfb64_encrypt(plain, cfb_buf1, (long)12, &eks,
+    IDEA_cfb64_encrypt(plain, cfb_buf1, 12, &eks,
         cfb_tmp, &n, IDEA_ENCRYPT);
     IDEA_cfb64_encrypt(&plain[12], &cfb_buf1[12],
         (long)CFB_TEST_SIZE - 12, &eks,
@@ -107,7 +107,7 @@ static int test_idea_cfb64(void)
         return 0;
     memcpy(cfb_tmp, cfb_iv, sizeof(cfb_tmp));
     n = 0;
-    IDEA_cfb64_encrypt(cfb_buf1, cfb_buf2, (long)13, &eks,
+    IDEA_cfb64_encrypt(cfb_buf1, cfb_buf2, 13, &eks,
         cfb_tmp, &n, IDEA_DECRYPT);
     IDEA_cfb64_encrypt(&cfb_buf1[13], &cfb_buf2[13],
         (long)CFB_TEST_SIZE - 13, &eks,