1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

PVS-Studio static analysis corrections (1) issue #137

This commit is contained in:
f4exb
2018-02-21 18:54:59 +01:00
parent 0ce9035e0a
commit f01b90094b
19 changed files with 36 additions and 190 deletions
+1 -1
View File
@@ -93,9 +93,9 @@ void HttpConnectionHandlerPool::cleanup()
{
if (++idleCounter > maxIdleHandlers)
{
delete handler;
pool.removeOne(handler);
qDebug("HttpConnectionHandlerPool: Removed connection handler (%p), pool size is now %i",handler,pool.size());
delete handler;
break; // remove only one handler in each interval
}
}
+1
View File
@@ -12,6 +12,7 @@ HttpCookie::HttpCookie()
version=1;
maxAge=0;
secure=false;
httpOnly=false;
}
HttpCookie::HttpCookie(const QByteArray name, const QByteArray value, const int maxAge, const QByteArray path, const QByteArray comment, const QByteArray domain, const bool secure, const bool httpOnly)
+9 -6
View File
@@ -488,13 +488,16 @@ void HttpRequest::parseMultiPartFile()
#ifdef SUPERVERBOSE
qDebug("HttpRequest::parseMultiPartFile: finishing writing to uploaded file");
#endif
uploadedFile->resize(uploadedFile->size()-2);
uploadedFile->flush();
uploadedFile->seek(0);
parameters.insert(fieldName,fileName);
qDebug("HttpRequest::parseMultiPartFile: set parameter %s=%s",fieldName.data(),fileName.data());
uploadedFiles.insert(fieldName,uploadedFile);
qDebug("HttpRequest::parseMultiPartFile: uploaded file size is %i",(int) uploadedFile->size());
if (uploadedFile)
{
uploadedFile->resize(uploadedFile->size()-2);
uploadedFile->flush();
uploadedFile->seek(0);
qDebug("HttpRequest::parseMultiPartFile: set parameter %s=%s",fieldName.data(),fileName.data());
uploadedFiles.insert(fieldName,uploadedFile);
qDebug("HttpRequest::parseMultiPartFile: uploaded file size is %i",(int) uploadedFile->size());
}
}
if (line.contains(boundary+"--"))
{