Skip to content

Commit 61bce8d

Browse files
author
Felipe Zimmerle
committed
Cosmetics: moving declaration to the too of the block
1 parent 9f92321 commit 61bce8d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

apache2/msc_multipart.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,14 +1327,14 @@ apr_status_t multipart_cleanup(modsec_rec *msr) {
13271327
} else {
13281328
/* Move file to the upload dir. */
13291329
if (parts[i]->tmp_file_name != NULL) {
1330+
const char *new_filename = NULL;
1331+
const char *new_basename = NULL;
1332+
13301333
if (strcmp(msr->txcfg->upload_dir, msr->txcfg->tmp_dir) == 0) {
13311334
msr_log(msr, 4, "Not moving part to identical location");
13321335
continue;
13331336
}
13341337

1335-
const char *new_filename = NULL;
1336-
const char *new_basename = NULL;
1337-
13381338
/* make sure it is closed first */
13391339
if (parts[i]->tmp_file_fd > 0) {
13401340
close(parts[i]->tmp_file_fd);

apache2/msc_reqbody.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -884,15 +884,15 @@ apr_status_t modsecurity_request_body_clear(modsec_rec *msr, char **error_msg) {
884884

885885
if (msr->msc_reqbody_filename != NULL) {
886886
if (keep_body) {
887+
/* Move request body (which is a file) to the storage area. */
888+
const char *put_filename = NULL;
889+
const char *put_basename = NULL;
890+
887891
if (strcmp(msr->txcfg->upload_dir, msr->txcfg->tmp_dir) == 0) {
888892
msr_log(msr, 4, "Not moving file to identical location.");
889893
goto nullify;
890894
}
891895

892-
/* Move request body (which is a file) to the storage area. */
893-
const char *put_filename = NULL;
894-
const char *put_basename = NULL;
895-
896896
/* Construct the new filename. */
897897
put_basename = file_basename(msr->msc_reqbody_mp, msr->msc_reqbody_filename);
898898
if (put_basename == NULL) {

0 commit comments

Comments
 (0)