fixed some warnings and minor issues detected by clang-analyzer

This commit is contained in:
Guenter Obiltschnig
2016-09-13 11:37:12 +02:00
parent 153b4a7232
commit 7c37f18f84
8 changed files with 17 additions and 15 deletions

View File

@@ -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;
}
}