]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Eliminate/fix repeated word usage
authorDimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
Sat, 4 Jul 2026 07:36:17 +0000 (09:36 +0200)
committerEugene Syromiatnikov <esyr@openssl.org>
Wed, 8 Jul 2026 10:07:53 +0000 (12:07 +0200)
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:11 2026
(Merged from https://github.com/openssl/openssl/pull/31860)

13 files changed:
apps/speed.c
crypto/ml_kem/ml_kem.c
crypto/rand/rand_uniform.c
crypto/rsa/rsa_backend.c
crypto/slh_dsa/slh_fors.c
crypto/x509/v3_akid.c
crypto/x509/v3_bitst.c
demos/http3/ossl-nghttp3.c
providers/fips/self_test.c
ssl/quic/quic_impl.c
ssl/quic/quic_txp.c
test/asn1_internal_test.c
test/danetest.c

index aa10d32bd58e172e07bed04607cb67cfa8ff6ffa..c63add0d8da93d8efe010b85043ed5ff63dad9a6 100644 (file)
@@ -2945,7 +2945,7 @@ int speed_main(int argc, char **argv)
                                 &outlen, loopargs[k].buf,
                                 lengths[testnum])) {
                             BIO_puts(bio_err,
-                                "\nFailed to to encrypt the data\n");
+                                "\nFailed to encrypt the data\n");
                             dofail();
                             exit(1);
                         }
index 2fc0e5a980a98ecac0b464b0d23c904586ac4262..27fa15e246561a243605fe274350062ef9fe39c8 100644 (file)
@@ -1148,7 +1148,7 @@ static __owur int gencbd_vector_ntt(scalar *out, CBD_FUNC cbd, uint8_t *counter,
  * |A| (our key->m, with the public key holding an expanded (16-bit per scalar
  * coefficient) key->t vector).
  *
- * Caller passes storage in |tmp| for for two temporary vectors.
+ * Caller passes storage in |tmp| for two temporary vectors.
  */
 static __owur int encrypt_cpa(uint8_t out[ML_KEM_SHARED_SECRET_BYTES],
     const uint8_t message[DEGREE / 8],
index 877150af4e5383a62228578c90a3355a5f9a3fda..0b7f7a3c0a069218ebcc3abfc06c9a54af345589 100644 (file)
@@ -47,7 +47,7 @@ uint32_t ossl_rand_uniform_uint32(OSSL_LIB_CTX *ctx, uint32_t upper, int *err)
      * We are generating a fixed point number on the interval [0, 1).
      * Multiplying this by the range gives us a number on [0, upper).
      * The high word of the multiplication result represents the integral
-     * part we want.  The lower word is the fractional part.  We can early exit if
+     * part we want.  The lower word is the fractional part.  We can early exit
      * if the fractional part is small enough that no carry from the next lower
      * word can cause an overflow and carry into the integer part.  This
      * happens when the fractional part is bounded by 2^32 - upper which
@@ -69,7 +69,7 @@ uint32_t ossl_rand_uniform_uint32(OSSL_LIB_CTX *ctx, uint32_t upper, int *err)
      * repeat the process with the next lower word.
      *
      * Each *bit* of randomness has a probability of one half of terminating
-     * this process, so each each word beyond the first has a probability
+     * this process, so each word beyond the first has a probability
      * of 2^-32 of not terminating the process.  That is, we're extremely
      * likely to stop very rapidly.
      */
index efacdcf9fe26e3044a0b73b117f8f9b175fff425..161d9a9c5612b6d3f45a4fdab59ea5a5a837cb07 100644 (file)
@@ -227,7 +227,7 @@ int ossl_rsa_fromdata(RSA *rsa, const OSSL_PARAM params[], int include_private)
 
     if (!ossl_rsa_check_factors(rsa)) {
         ERR_raise_data(ERR_LIB_RSA, RSA_R_INVALID_KEYPAIR,
-            "RSA factors/exponents are too big for for n-modulus\n");
+            "RSA factors/exponents are too big for n-modulus\n");
         goto err;
     }
 
index 78587589db42858cba2ee8ef68de66a2c9fc0303..10335cc5df2e9fff3eecadafb24ce3156645e697 100644 (file)
@@ -156,7 +156,7 @@ int ossl_slh_fors_sign(SLH_DSA_HASH_CTX *ctx, const uint8_t *md,
         /*
          * Give each of the k trees a unique range at each level.
          * e.g. If we have 4096 leaf nodes (2^a = 2^12) for each tree
-         * tree i will use indexes from 4096 * i + (0..4095) for its bottom level.
+         * i will use indexes from 4096 * i + (0..4095) for its bottom level.
          * For the next level up from the bottom there would be 2048 nodes
          * (so tree i uses indexes 2048 * i + (0...2047) for this level)
          */
index 9c93e88267d27e4f512fbd55278329d28a97c530..f500165d0da8478ad5a12d642e85c807bddfa55f 100644 (file)
@@ -179,7 +179,7 @@ static AUTHORITY_KEYID *v2i_AUTHORITY_KEYID(X509V3_EXT_METHOD *method,
         /*
          * The subject key identifier of the issuer cert is acceptable unless
          * the issuer cert is same as subject cert, but the subject will not
-         * not be self-signed (i.e. will be signed with a different key).
+         * be self-signed (i.e. will be signed with a different key).
          */
         i = X509_get_ext_by_NID(issuer_cert, NID_subject_key_identifier, -1);
         if (i >= 0 && (ext = X509_get_ext(issuer_cert, i)) != NULL
index 89c3deddd35d986a4cb208bb4643af75c8ffe233..1b0204bf75d709c3c33f518094fc839a12dc868c 100644 (file)
@@ -52,7 +52,7 @@ STACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,
     for (bnam = method->usr_data; bnam->lname; bnam++) {
         /*
          * If the bitnumber did not change from the last iteration, this entry
-         * is an an alias for the previous bit; treat the first result as
+         * is an alias for the previous bit; treat the first result as
          * canonical and ignore the rest.
          */
         if (last_seen_bit == bnam->bitnum)
index 2461df73c2c17c5042da6b62ce913186eea713ff..e75f226221648b94f95842904379bcb3196aa0aa 100644 (file)
@@ -543,7 +543,7 @@ static void h3_conn_pump_stream(OSSL_DEMO_H3_STREAM *s, void *conn_)
             break;
 
         /*
-         * This function is confusingly named as it is is named from nghttp3's
+         * This function is confusingly named as it is named from nghttp3's
          * 'perspective'; it is used to pass data *into* the HTTP/3 stack which
          * has been received from the network.
          */
index 6024395aa0c2f8824386beb4a477ccf121ec0690..364fd0ef6585f8a104649375b443af4a979b46d0 100644 (file)
@@ -344,7 +344,7 @@ int SELF_TEST_post(SELF_TEST_POST_PARAMS *st, void *fips_global,
     bio_module = (*st->bio_new_file_cb)(st->module_filename, "rb");
 
     /* This section can be called on demand and that could race with deferred
-     * tests being executed in another thread, so we use use helpers to get
+     * tests being executed in another thread, so we use helpers to get
      * proper locking around this critical section */
 
     if (SELF_TEST_lock_deferred(fips_global)) {
index 1efc149119ca8c18285f62dce7a1ce47ffe594b8..67725bf454ed510bd2b6f9919480db576a3d1029 100644 (file)
@@ -4906,7 +4906,7 @@ SSL *ossl_quic_new_from_listener(SSL *ssl, uint64_t flags)
     ossl_quic_channel_set_msg_callback_arg(qc->ch, ql->obj.ssl.ctx->msg_callback_arg);
 
     /*
-     * We deliberately pass NULL for engine and port, because we don't want to
+     * We deliberately pass NULL for engine and port, because we don't want
      * to turn QCSO we create here into an event leader, nor port leader.
      * Both those roles are occupied already by listener (`ssl`) we use
      * to create a new QCSO here.
index 425f76a003ca7f62006137c206070f9d339881f9..bd026af3a4056bb63ca8b23b4f804e83b386c766 100644 (file)
@@ -1477,7 +1477,7 @@ static int txp_should_try_staging(OSSL_QUIC_TX_PACKETISER *txp,
      * This is not a major concern for clients, since if a client has a 1-RTT EL
      * provisioned the server is guaranteed to also have a 1-RTT EL provisioned.
      *
-     * TODO(QUIC FUTURE): Revisit this when when have reached a decision on how
+     * TODO(QUIC FUTURE): Revisit this when we have reached a decision on how
      * best to implement this
      */
     if (*conn_close_enc_level > enc_level
index 8edea7ca91130247c9abc10e7a67ef0af3360a3f..1f6785cda31ae162ad3ca80b085410dc026740b8 100644 (file)
@@ -476,7 +476,7 @@ static int posix_time_test(void)
 
     /*
      * Frequently platform conversions can not deal with one second before the
-     * the Unix epoch, due to inheriting terrible API design and knocking this
+     * Unix epoch, due to inheriting terrible API design and knocking this
      * time value out as an error return.
      *
      * We should do better.
index 1b0320b28de5a72c30e1fcab79073f386419e387..f9e30388e1972fc170bef74fe7b98949202c2960 100644 (file)
@@ -370,7 +370,7 @@ static int test_tlsafile(SSL_CTX *ctx, const char *base_name,
             continue;
         }
         if (!TEST_int_eq(mdpth, want_depth)) {
-            TEST_info("In test test %d", testno);
+            TEST_info("In test %d", testno);
             ret = 0;
         }
     }