Skip to content

Commit 7fed599

Browse files
committed
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
1 parent b23abf4 commit 7fed599

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/request_body_processor/multipart.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ int Multipart::boundary_characters_valid(const char *boundary) {
231231

232232

233233
void Multipart::validate_quotes(const char *data, char quote) {
234-
int i, len;
234+
int len;
235235

236236
if (data == NULL)
237237
return;
@@ -244,7 +244,7 @@ void Multipart::validate_quotes(const char *data, char quote) {
244244

245245
len = strlen(data);
246246

247-
for (i = 0; i < len; i++) {
247+
for (int i = 0;i < len;i++) {
248248
if (data[i] == '\'') {
249249
ms_dbg_a(m_transaction, 9,
250250
"Multipart: Invalid quoting detected: " \

0 commit comments

Comments
 (0)