mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 12:18:01 +01:00
fixed some warnings and minor issues detected by clang-analyzer
This commit is contained in:
@@ -105,18 +105,21 @@ namespace
|
||||
poco_check_ptr (pPS);
|
||||
NameValueCollection::ConstIterator it = header.begin();
|
||||
NameValueCollection::ConstIterator end = header.end();
|
||||
bool added = false;
|
||||
for (; it != end; ++it)
|
||||
{
|
||||
if (MailMessage::HEADER_CONTENT_DISPOSITION == it->first)
|
||||
if (!added && MailMessage::HEADER_CONTENT_DISPOSITION == it->first)
|
||||
{
|
||||
if (it->second == "inline")
|
||||
_pMsg->addContent(pPS, cte);
|
||||
else
|
||||
_pMsg->addAttachment("", pPS, cte);
|
||||
added = true;
|
||||
}
|
||||
|
||||
pPS->headers().set(it->first, it->second);
|
||||
}
|
||||
if (!added) delete pPS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user