summaryrefslogtreecommitdiff
path: root/automation
diff options
context:
space:
mode:
authorAndreas Becker <atayoohoo@googlemail.com>2011-04-28 00:59:28 +0200
committerKatarina Machalkova <kmachalkova@suse.cz>2011-04-28 13:45:46 +0200
commit9ad4eeb4fa413b1a3e084d141c6eb01795f95b7f (patch)
tree031b7ad30c650665210cb5b63d59efe740fd57d1 /automation
parent8a9f54bc1283b7137a90506e29dba7962dd73f83 (diff)
fixed cppcheck warnings
Diffstat (limited to 'automation')
-rw-r--r--automation/source/miniapp/testapp.cxx1
-rw-r--r--automation/source/miniapp/testapp.hxx1
-rw-r--r--automation/source/testtool/httprequest.cxx24
3 files changed, 11 insertions, 15 deletions
diff --git a/automation/source/miniapp/testapp.cxx b/automation/source/miniapp/testapp.cxx
index 914b59a6739c..66cbb38365a0 100644
--- a/automation/source/miniapp/testapp.cxx
+++ b/automation/source/miniapp/testapp.cxx
@@ -157,6 +157,7 @@ MyApp aApp;
MyApp::MyApp()
{
pMainWin = NULL;
+ pMyDispatcher = NULL;
}
void MyApp::Property( ApplicationProperty& rProp )
diff --git a/automation/source/miniapp/testapp.hxx b/automation/source/miniapp/testapp.hxx
index 65bfe777d0d1..fd313c9cbd40 100644
--- a/automation/source/miniapp/testapp.hxx
+++ b/automation/source/miniapp/testapp.hxx
@@ -86,7 +86,6 @@ public:
class MyApp : public Application
{
- PopupMenu *MyMenu;
Timer aCommandTimer;
PlugInDispatcher *pMyDispatcher;
diff --git a/automation/source/testtool/httprequest.cxx b/automation/source/testtool/httprequest.cxx
index d10469e0496a..1212d3806486 100644
--- a/automation/source/testtool/httprequest.cxx
+++ b/automation/source/testtool/httprequest.cxx
@@ -45,15 +45,18 @@ void HttpRequest::Init()
}
HttpRequest::HttpRequest()
-: nStatus( HTTP_INIT )
-, nResultId( 0 )
-, pStream( NULL )
-{}
+ : nStatus(HTTP_INIT), nResultId(0),
+ pStream(NULL), pOutSocket(NULL)
+{
+}
HttpRequest::~HttpRequest()
{
delete pStream;
pStream = NULL;
+
+ delete pOutSocket;
+ pOutSocket = NULL;
}
void HttpRequest::SetRequest( ByteString aHost, ByteString aPath, sal_uInt16 nPort )
@@ -95,18 +98,14 @@ sal_Bool HttpRequest::Execute()
aTV.Nanosec = 0;
pOutSocket = new osl::ConnectorSocket();
- if ( pOutSocket->connect( aConnectAddr, &aTV ) == osl_Socket_Ok )
- {
-// pOutSocket->setTcpNoDelay( 1 );
- }
- else
+ if ( pOutSocket->connect( aConnectAddr, &aTV ) != osl_Socket_Ok )
{
delete pOutSocket;
+ pOutSocket = NULL;
nStatus = HTTP_REQUEST_ERROR;
return sal_False;
}
-
SendString( pOutSocket, "GET " );
if ( aProxyHost.Len() )
{
@@ -218,14 +217,11 @@ void HttpRequest::Abort()
if ( pOutSocket )
{
nStatus = HTTP_REQUEST_ERROR;
- pOutSocket->shutdown();
+ pOutSocket->shutdown();
pOutSocket->close();
}
}
-
-
-
SvMemoryStream* HttpRequest::GetBody()
{
return pStream;