src/request_body_processor/multipart.cc: reduce the scope of variable in a for () loop

In general, it is always preferable to reduce
the scope of a variable in a for loop
This commit is contained in:
Elia Pinto 2024-02-21 13:50:51 +01:00
parent b23abf440a
commit 7fed599fdb

View File

@ -231,7 +231,7 @@ int Multipart::boundary_characters_valid(const char *boundary) {
void Multipart::validate_quotes(const char *data, char quote) { void Multipart::validate_quotes(const char *data, char quote) {
int i, len; int len;
if (data == NULL) if (data == NULL)
return; return;
@ -244,7 +244,7 @@ void Multipart::validate_quotes(const char *data, char quote) {
len = strlen(data); len = strlen(data);
for (i = 0; i < len; i++) { for (int i = 0;i < len;i++) {
if (data[i] == '\'') { if (data[i] == '\'') {
ms_dbg_a(m_transaction, 9, ms_dbg_a(m_transaction, 9,
"Multipart: Invalid quoting detected: " \ "Multipart: Invalid quoting detected: " \