Skip to content

Commit a5320ad

Browse files
committed
Refactoring: remove two unneeded local vars from multipart parser
1 parent 9ea50a4 commit a5320ad

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/request_body_processor/multipart.cc

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,15 +1198,9 @@ int Multipart::multipart_complete(std::string *error) {
11981198
size_t offset = m_transaction->m_variableOffset + 1;
11991199

12001200
if (m->m_type == MULTIPART_FILE) {
1201-
std::string tmp_name;
1202-
std::string name;
1203-
if (m->m_tmp_file && !m->m_tmp_file->getFilename().empty()) {
1204-
tmp_name.assign(m->m_tmp_file->getFilename());
1205-
m_transaction->m_variableFilesTmpNames.set(m->m_tmp_file->getFilename(),
1206-
m->m_tmp_file->getFilename(), m->m_filenameOffset);
1207-
}
1208-
if (!m->m_filename.empty()) {
1209-
name.assign(m->m_filename);
1201+
if (m->m_tmp_file && !m->m_tmp_file->getFilename().empty()) {
1202+
m_transaction->m_variableFilesTmpNames.set(m->m_tmp_file->getFilename(),
1203+
m->m_tmp_file->getFilename(), m->m_filenameOffset);
12101204
}
12111205

12121206
m_transaction->m_variableFiles.set(m->m_name,

0 commit comments

Comments
 (0)