smtp: remove SCMimeSmtpConfigExtractUrlsSchemeReset

It doesn't appear to be needed. The vec being cleared is only set once
per run, so never needs to be cleared.

Removes one point where we have to supress the static_mut_refs compiler
warning.

Ticket: #7417
pull/12685/head
Jason Ish 3 days ago committed by Victor Julien
parent 97ee95c1a2
commit 9ed5b4c002

@ -742,11 +742,6 @@ pub unsafe extern "C" fn SCMimeSmtpConfigHeaderValueDepth(val: u32) {
MIME_SMTP_CONFIG_HEADER_VALUE_DEPTH = val; MIME_SMTP_CONFIG_HEADER_VALUE_DEPTH = val;
} }
#[no_mangle]
pub unsafe extern "C" fn SCMimeSmtpConfigExtractUrlsSchemeReset() {
MIME_SMTP_CONFIG_EXTRACT_URL_SCHEMES.clear();
}
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn SCMimeSmtpConfigExtractUrlsSchemeAdd( pub unsafe extern "C" fn SCMimeSmtpConfigExtractUrlsSchemeAdd(
str: *const std::os::raw::c_char, str: *const std::os::raw::c_char,

@ -356,7 +356,6 @@ static void SMTPConfigure(void) {
if (extract_urls_schemes) { if (extract_urls_schemes) {
ConfNode *scheme = NULL; ConfNode *scheme = NULL;
SCMimeSmtpConfigExtractUrlsSchemeReset();
TAILQ_FOREACH (scheme, &extract_urls_schemes->head, next) { TAILQ_FOREACH (scheme, &extract_urls_schemes->head, next) {
size_t scheme_len = strlen(scheme->val); size_t scheme_len = strlen(scheme->val);
if (scheme_len > UINT16_MAX - SCHEME_SUFFIX_LEN) { if (scheme_len > UINT16_MAX - SCHEME_SUFFIX_LEN) {
@ -383,7 +382,6 @@ static void SMTPConfigure(void) {
} else { } else {
/* Add default extract url scheme 'http' since /* Add default extract url scheme 'http' since
* extract-urls-schemes wasn't found in the config */ * extract-urls-schemes wasn't found in the config */
SCMimeSmtpConfigExtractUrlsSchemeReset();
SCMimeSmtpConfigExtractUrlsSchemeAdd("http://"); SCMimeSmtpConfigExtractUrlsSchemeAdd("http://");
} }

Loading…
Cancel
Save