From 4780e509aade2b17ef7a7cbf2212288ce88e48d7 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 15 May 2026 00:37:37 +0200 Subject: [PATCH] tidy-up: prefer "initialize" with a 'z' To match the majority of usage in source. Closes #21618 --- include/curl/curl.h | 2 +- lib/conncache.c | 4 ++-- lib/conncache.h | 2 +- lib/cshutdn.c | 4 ++-- lib/cshutdn.h | 2 +- lib/curl_sha512_256.c | 8 ++++---- lib/curl_share.c | 2 +- lib/curlx/strerr.c | 2 +- lib/imap.c | 2 +- lib/pingpong.c | 6 +++--- lib/pingpong.h | 2 +- lib/pop3.c | 4 ++-- lib/select.h | 2 +- lib/smtp.c | 8 ++++---- lib/socketpair.h | 2 +- lib/socks_sspi.c | 2 +- lib/strerror.c | 2 +- lib/vauth/digest.c | 4 ++-- lib/vauth/ntlm.c | 2 +- lib/vauth/ntlm_sspi.c | 2 +- lib/vquic/vquic.c | 2 +- lib/vssh/libssh.c | 6 +++--- lib/vssh/ssh.h | 2 +- lib/vtls/openssl.c | 2 +- projects/vms/curlmsg.msg | 2 +- src/tool_cfgable.c | 2 +- src/tool_operate.c | 2 +- tests/data/test1538 | 2 +- 28 files changed, 42 insertions(+), 42 deletions(-) diff --git a/include/curl/curl.h b/include/curl/curl.h index 6961a6c4c1..76ba525252 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -593,7 +593,7 @@ typedef enum { CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind that failed */ - CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ + CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialize ENGINE */ CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not accepted and we failed to login */ CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ diff --git a/lib/conncache.c b/lib/conncache.c index 33fb68b124..fe180be1f5 100644 --- a/lib/conncache.c +++ b/lib/conncache.c @@ -122,7 +122,7 @@ void Curl_cpool_init(struct cpool *cpool, cpool->idata = idata; cpool->share = share; - cpool->initialised = TRUE; + cpool->initialized = TRUE; } /* Return the "first" connection in the pool or NULL. */ @@ -230,7 +230,7 @@ static void cpool_discard_conn(struct cpool *cpool, void Curl_cpool_destroy(struct cpool *cpool) { - if(cpool && cpool->initialised && cpool->idata) { + if(cpool && cpool->initialized && cpool->idata) { struct connectdata *conn; struct Curl_sigpipe_ctx pipe_ctx; diff --git a/lib/conncache.h b/lib/conncache.h index 7cee4d4729..71940d724c 100644 --- a/lib/conncache.h +++ b/lib/conncache.h @@ -56,7 +56,7 @@ struct cpool { struct Curl_easy *idata; /* internal handle for maintenance */ struct Curl_share *share; /* != NULL if pool belongs to share */ BIT(locked); - BIT(initialised); + BIT(initialized); }; /* Init the pool, pass multi only if pool is owned by it. diff --git a/lib/cshutdn.c b/lib/cshutdn.c index 27b4a9f0dd..f284c0ea7c 100644 --- a/lib/cshutdn.c +++ b/lib/cshutdn.c @@ -322,14 +322,14 @@ int Curl_cshutdn_init(struct cshutdn *cshutdn, DEBUGASSERT(multi); cshutdn->multi = multi; Curl_llist_init(&cshutdn->list, NULL); - cshutdn->initialised = TRUE; + cshutdn->initialized = TRUE; return 0; /* good */ } void Curl_cshutdn_destroy(struct cshutdn *cshutdn, struct Curl_easy *data) { - if(cshutdn->initialised && data) { + if(cshutdn->initialized && data) { int timeout_ms = 0; /* for testing, run graceful shutdown */ #ifdef DEBUGBUILD diff --git a/lib/cshutdn.h b/lib/cshutdn.h index b2e83f3d1a..8479524993 100644 --- a/lib/cshutdn.h +++ b/lib/cshutdn.h @@ -54,7 +54,7 @@ void Curl_cshutdn_terminate(struct Curl_easy *data, struct cshutdn { struct Curl_llist list; /* connections being shut down */ struct Curl_multi *multi; /* the multi owning this */ - BIT(initialised); + BIT(initialized); }; /* Init as part of the given multi handle. */ diff --git a/lib/curl_sha512_256.c b/lib/curl_sha512_256.c index 0e602c6ae8..f8f2053b5d 100644 --- a/lib/curl_sha512_256.c +++ b/lib/curl_sha512_256.c @@ -103,7 +103,7 @@ typedef EVP_MD_CTX *Curl_sha512_256_ctx; /** - * Initialise structure for SHA-512/256 calculation. + * Initialize structure for SHA-512/256 calculation. * * @param context the calculation context * @return CURLE_OK if succeed, @@ -232,7 +232,7 @@ static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *ctx) typedef struct sha512_256_ctx Curl_sha512_256_ctx; /** - * Initialise structure for SHA-512/256 calculation. + * Initialize structure for SHA-512/256 calculation. * * @param context the calculation context * @return always CURLE_OK @@ -435,7 +435,7 @@ struct Curl_sha512_256ctx { typedef struct Curl_sha512_256ctx Curl_sha512_256_ctx; /** - * Initialise structure for SHA-512/256 calculation. + * Initialize structure for SHA-512/256 calculation. * * @param context the calculation context * @return always CURLE_OK @@ -461,7 +461,7 @@ static CURLcode Curl_sha512_256_init(void *context) ctx->H[6] = UINT64_C(0x2B0199FC2C85B8AA); ctx->H[7] = UINT64_C(0x0EB72DDC81C52CA2); - /* Initialise number of bytes and high part of number of bits. */ + /* Initialize number of bytes and high part of number of bits. */ ctx->count = UINT64_C(0); ctx->count_bits_hi = UINT64_C(0); diff --git a/lib/curl_share.c b/lib/curl_share.c index 386a2b547d..94469bc3ef 100644 --- a/lib/curl_share.c +++ b/lib/curl_share.c @@ -260,7 +260,7 @@ CURLSHcode curl_share_setopt(CURLSH *sh, CURLSHoption option, ...) case CURL_LOCK_DATA_CONNECT: /* It is safe to set this option several times on a share. */ - if(!share->cpool.initialised) { + if(!share->cpool.initialized) { Curl_cpool_init(&share->cpool, share->admin, share, 103); } break; diff --git a/lib/curlx/strerr.c b/lib/curlx/strerr.c index b53173c578..5fc3bc003b 100644 --- a/lib/curlx/strerr.c +++ b/lib/curlx/strerr.c @@ -190,7 +190,7 @@ static const char *get_winsock_error(int err, char *buf, size_t len) p = "Winsock library is not ready"; break; case WSANOTINITIALISED: - p = "Winsock library not initialised"; + p = "Winsock library not initialized"; break; case WSAVERNOTSUPPORTED: p = "Winsock version not supported"; diff --git a/lib/imap.c b/lib/imap.c index 0a4cb5b7b7..9eb79e5aef 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -1795,7 +1795,7 @@ static CURLcode imap_parse_url_options(struct connectdata *conn, static CURLcode imap_parse_url_path(struct Curl_easy *data, struct IMAP *imap) { - /* The imap struct is already initialised in imap_connect() */ + /* The imap struct is already initialized in imap_connect() */ CURLcode result = CURLE_OK; const char *begin = &data->state.up.path[1]; /* skip leading slash */ const char *ptr = begin; diff --git a/lib/pingpong.c b/lib/pingpong.c index 44e424418d..6952d659a9 100644 --- a/lib/pingpong.c +++ b/lib/pingpong.c @@ -120,13 +120,13 @@ CURLcode Curl_pp_statemach(struct Curl_easy *data, /* initialize stuff to prepare for reading a fresh new response */ void Curl_pp_init(struct pingpong *pp, const struct curltime *pnow) { - DEBUGASSERT(!pp->initialised); + DEBUGASSERT(!pp->initialized); pp->nread_resp = 0; pp->response = *pnow; /* start response time-out */ pp->pending_resp = TRUE; curlx_dyn_init(&pp->sendbuf, DYN_PINGPPONG_CMD); curlx_dyn_init(&pp->recvbuf, DYN_PINGPPONG_CMD); - pp->initialised = TRUE; + pp->initialized = TRUE; } /*********************************************************************** @@ -389,7 +389,7 @@ CURLcode Curl_pp_flushsend(struct Curl_easy *data, CURLcode Curl_pp_disconnect(struct pingpong *pp) { - if(pp->initialised) { + if(pp->initialized) { curlx_dyn_free(&pp->sendbuf); curlx_dyn_free(&pp->recvbuf); memset(pp, 0, sizeof(*pp)); diff --git a/lib/pingpong.h b/lib/pingpong.h index 864f2c6835..02f4961230 100644 --- a/lib/pingpong.h +++ b/lib/pingpong.h @@ -64,7 +64,7 @@ struct pingpong { CURLcode (*statemachine)(struct Curl_easy *data, struct connectdata *conn); bool (*endofresp)(struct Curl_easy *data, struct connectdata *conn, const char *ptr, size_t len, int *code); - BIT(initialised); + BIT(initialized); BIT(pending_resp); /* set TRUE when a server response is pending or in progress, and is cleared once the last response is read */ diff --git a/lib/pop3.c b/lib/pop3.c index 7dbeefb6e7..3036ce717c 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -231,7 +231,7 @@ static CURLcode pop3_parse_url_options(struct connectdata *conn) */ static CURLcode pop3_parse_url_path(struct Curl_easy *data) { - /* The POP3 struct is already initialised in pop3_connect() */ + /* The POP3 struct is already initialized in pop3_connect() */ struct POP3 *pop3 = Curl_meta_get(data, CURL_META_POP3_EASY); const char *path = &data->state.up.path[1]; /* skip leading path */ @@ -1439,7 +1439,7 @@ static CURLcode pop3_connect(struct Curl_easy *data, bool *done) pop3c->preftype = POP3_TYPE_ANY; Curl_sasl_init(&pop3c->sasl, data, &saslpop3); - /* Initialise the pingpong layer */ + /* Initialize the pingpong layer */ Curl_pp_init(pp, Curl_pgrs_now(data)); /* Parse the URL options */ diff --git a/lib/select.h b/lib/select.h index 87b695463f..dbbace4527 100644 --- a/lib/select.h +++ b/lib/select.h @@ -131,7 +131,7 @@ struct easy_pollset { #define CURL_EASY_POLLSET_MAGIC 0x7a657370 #endif -/* allocate and initialise */ +/* allocate and initialize */ struct easy_pollset *Curl_pollset_create(void); /* Initialize before first use */ diff --git a/lib/smtp.c b/lib/smtp.c index b5c425cd7c..dee7a329ca 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -182,7 +182,7 @@ static CURLcode smtp_parse_url_options(struct connectdata *conn, static CURLcode smtp_parse_url_path(struct Curl_easy *data, struct smtp_conn *smtpc) { - /* The SMTP struct is already initialised in smtp_connect() */ + /* The SMTP struct is already initialized in smtp_connect() */ const char *path = &data->state.up.path[1]; /* skip leading path */ char localhost[HOSTNAME_MAX + 1]; @@ -608,7 +608,7 @@ static void smtp_state(struct Curl_easy *data, * * smtp_perform_ehlo() * - * Sends the EHLO command to not only initialise communication with the ESMTP + * Sends the EHLO command to not only initialize communication with the ESMTP * server but to also obtain a list of server side supported capabilities. */ static CURLcode smtp_perform_ehlo(struct Curl_easy *data, @@ -635,7 +635,7 @@ static CURLcode smtp_perform_ehlo(struct Curl_easy *data, * * smtp_perform_helo() * - * Sends the HELO command to initialise communication with the SMTP server. + * Sends the HELO command to initialize communication with the SMTP server. */ static CURLcode smtp_perform_helo(struct Curl_easy *data, struct smtp_conn *smtpc) @@ -1677,7 +1677,7 @@ static CURLcode smtp_connect(struct Curl_easy *data, bool *done) /* Initialize the SASL storage */ Curl_sasl_init(&smtpc->sasl, data, &saslsmtp); - /* Initialise the pingpong layer */ + /* Initialize the pingpong layer */ Curl_pp_init(&smtpc->pp, Curl_pgrs_now(data)); /* Parse the URL options */ diff --git a/lib/socketpair.h b/lib/socketpair.h index 0427e72fc5..fd08c879da 100644 --- a/lib/socketpair.h +++ b/lib/socketpair.h @@ -27,7 +27,7 @@ #ifndef CURL_DISABLE_SOCKETPAIR -/* return < 0 for failure to initialise */ +/* return < 0 for failure to initialize */ int Curl_wakeup_init(curl_socket_t socks[2], bool nonblocking); void Curl_wakeup_destroy(curl_socket_t socks[2]); diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c index a4cc9796b0..7c043093e1 100644 --- a/lib/socks_sspi.c +++ b/lib/socks_sspi.c @@ -164,7 +164,7 @@ static CURLcode socks5_sspi_loop(struct Curl_cfilter *cf, sspi_recv_token.cbBuffer = 0; if(check_sspi_err(data, status, "InitializeSecurityContext")) { - failf(data, "Failed to initialise security context."); + failf(data, "Failed to initialize security context."); return socks5_free_token(&sspi_send_token, CURLE_COULDNT_CONNECT); } diff --git a/lib/strerror.c b/lib/strerror.c index 1e97c2829d..e1089f3233 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -172,7 +172,7 @@ const char *curl_easy_strerror(CURLcode error) return "Can not set SSL crypto engine as default"; case CURLE_SSL_ENGINE_INITFAILED: - return "Failed to initialise SSL crypto engine"; + return "Failed to initialize SSL crypto engine"; case CURLE_SEND_ERROR: return "Failed sending data to the peer"; diff --git a/lib/vauth/digest.c b/lib/vauth/digest.c index 9843fd8ef7..6d935fc99e 100644 --- a/lib/vauth/digest.c +++ b/lib/vauth/digest.c @@ -231,7 +231,7 @@ static bool auth_digest_get_key_value(const char *chlg, const char *key, static void auth_digest_get_qop_values(const char *options, int *value) { struct Curl_str out; - /* Initialise the output */ + /* Initialize the output */ *value = 0; while(!curlx_str_until(&options, &out, 32, ',')) { @@ -520,7 +520,7 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg, if(digest->nonce) before = TRUE; - /* Clean up any former leftovers and initialise to defaults */ + /* Clean up any former leftovers and initialize to defaults */ Curl_auth_digest_cleanup(digest); for(;;) { diff --git a/lib/vauth/ntlm.c b/lib/vauth/ntlm.c index 121c6cae56..f4af3755f1 100644 --- a/lib/vauth/ntlm.c +++ b/lib/vauth/ntlm.c @@ -458,7 +458,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data, (void)service; (void)host; - /* Clean up any former leftovers and initialise to defaults */ + /* Clean up any former leftovers and initialize to defaults */ Curl_auth_cleanup_ntlm(ntlm); ntlmbuf = curl_maprintf(NTLMSSP_SIGNATURE "%c" diff --git a/lib/vauth/ntlm_sspi.c b/lib/vauth/ntlm_sspi.c index e3ade65c96..bd33dceb55 100644 --- a/lib/vauth/ntlm_sspi.c +++ b/lib/vauth/ntlm_sspi.c @@ -90,7 +90,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data, const char *service = Curl_creds_has_sasl_service(creds) ? Curl_creds_sasl_service(creds) : default_service; - /* Clean up any former leftovers and initialise to defaults */ + /* Clean up any former leftovers and initialize to defaults */ Curl_auth_cleanup_ntlm(ntlm); /* Query the security package for NTLM */ diff --git a/lib/vquic/vquic.c b/lib/vquic/vquic.c index 0040ad671f..cf4bc5a65f 100644 --- a/lib/vquic/vquic.c +++ b/lib/vquic/vquic.c @@ -500,7 +500,7 @@ static CURLcode recvmsg_packets(struct Curl_cfilter *cf, DEBUGASSERT(max_pkts > 0); for(pkts = 0, total_nread = 0, calls = 0; pkts < max_pkts;) { - /* fully initialise this on each call to `recvmsg()`. There seem to + /* fully initialize this on each call to `recvmsg()`. There seem to * operating systems out there that mess with `msg_iov.iov_len`. */ memset(&msg, 0, sizeof(msg)); msg_iov.iov_base = buf; diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index d37dcd712f..149b4cce0c 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -1871,7 +1871,7 @@ static int myssh_in_TRANS_INIT(struct Curl_easy *data, struct ssh_conn *sshc, static void sshc_cleanup(struct ssh_conn *sshc) { - if(sshc->initialised) { + if(sshc->initialized) { if(sshc->sftp_file) { sftp_close(sshc->sftp_file); sshc->sftp_file = NULL; @@ -1921,7 +1921,7 @@ static void sshc_cleanup(struct ssh_conn *sshc) curlx_dyn_free(&sshc->readdir_buf); curlx_safefree(sshc->readdir_linkPath); SSH_STRING_FREE_CHAR(sshc->homedir); - sshc->initialised = FALSE; + sshc->initialized = FALSE; } } @@ -2566,7 +2566,7 @@ static CURLcode myssh_setup_connection(struct Curl_easy *data, return CURLE_OUT_OF_MEMORY; curlx_dyn_init(&sshc->readdir_buf, CURL_PATH_MAX * 2); - sshc->initialised = TRUE; + sshc->initialized = TRUE; if(Curl_conn_meta_set(conn, CURL_META_SSH_CONN, sshc, myssh_conn_dtor)) return CURLE_OUT_OF_MEMORY; diff --git a/lib/vssh/ssh.h b/lib/vssh/ssh.h index 44e72ab802..24309f5207 100644 --- a/lib/vssh/ssh.h +++ b/lib/vssh/ssh.h @@ -195,7 +195,7 @@ struct ssh_conn { const char *readdir_filename; /* points within readdir_attrs */ const char *readdir_longentry; char *readdir_tmp; - BIT(initialised); + BIT(initialized); #elif defined(USE_LIBSSH2) LIBSSH2_SESSION *ssh_session; /* Secure Shell session */ LIBSSH2_CHANNEL *ssh_channel; /* Secure Shell channel handle */ diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 0178acfe59..2eeb2f349d 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -1671,7 +1671,7 @@ static CURLcode ossl_set_engine(struct Curl_easy *data, const char *name) char buf[256]; ENGINE_free(e); - failf(data, "Failed to initialise SSL Engine '%s': %s", + failf(data, "Failed to initialize SSL Engine '%s': %s", name, ossl_strerror(ERR_get_error(), buf, sizeof(buf))); result = CURLE_SSL_ENGINE_INITFAILED; e = NULL; diff --git a/projects/vms/curlmsg.msg b/projects/vms/curlmsg.msg index 8d428e88b6..b02fe5649c 100644 --- a/projects/vms/curlmsg.msg +++ b/projects/vms/curlmsg.msg @@ -111,7 +111,7 @@ LDAP_INVALID_URL FILESIZE_EXCEEDED USE_SSL_FAILED SEND_FAIL_REWIND -SSL_ENGINE_INITFAILED +SSL_ENGINE_INITFAILED LOGIN_DENIED TFTP_NOTFOUND TFTP_PERM diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c index 515df19073..e0b60b7dba 100644 --- a/src/tool_cfgable.c +++ b/src/tool_cfgable.c @@ -316,7 +316,7 @@ CURLcode globalconf_init(void) _djstat_flags |= _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE; #endif - /* Initialise the global config */ + /* Initialize the global config */ global->showerror = FALSE; /* show errors when silent */ global->styled_output = TRUE; /* enable detection */ global->parallel_max = PARALLEL_DEFAULT; diff --git a/src/tool_operate.c b/src/tool_operate.c index c5ac095cb9..a8d928f496 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -2459,7 +2459,7 @@ CURLcode operate(int argc, argv_item_t argv[]) } else { if(global->libcurl) { - /* Initialise the libcurl source output */ + /* Initialize the libcurl source output */ result = easysrc_init(); } diff --git a/tests/data/test1538 b/tests/data/test1538 index e989fdd17f..51580576ee 100644 --- a/tests/data/test1538 +++ b/tests/data/test1538 @@ -94,7 +94,7 @@ e62: Unknown error e63: Maximum file size exceeded e64: Requested SSL level failed e65: Send failed since rewinding of the data stream failed -e66: Failed to initialise SSL crypto engine +e66: Failed to initialize SSL crypto engine e67: Login denied e68: TFTP: File Not Found e69: TFTP: Access Violation