aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/SSecurityStack.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2021-06-10 16:36:46 +0200
committerPierre Ossman <ossman@cendio.se>2021-06-11 09:42:44 +0200
commitcef285311fda1cadbdcadeeb3259a6ae032dd652 (patch)
tree7cef1c61426bb6ebaddeb319b97cf861d6ff4afe /common/rfb/SSecurityStack.cxx
parent9c407d2a0bc11697ae8413a8e6bea21813fd6072 (diff)
downloadtigervnc-cef285311fda1cadbdcadeeb3259a6ae032dd652.tar.gz
tigervnc-cef285311fda1cadbdcadeeb3259a6ae032dd652.zip
Remove unneeded NULL checks
It's perfectly safe to delete NULL pointers, so simplify things by removing these checks.
Diffstat (limited to 'common/rfb/SSecurityStack.cxx')
-rw-r--r--common/rfb/SSecurityStack.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/common/rfb/SSecurityStack.cxx b/common/rfb/SSecurityStack.cxx
index 74509e71..81395113 100644
--- a/common/rfb/SSecurityStack.cxx
+++ b/common/rfb/SSecurityStack.cxx
@@ -28,10 +28,8 @@ SSecurityStack::SSecurityStack(SConnection* sc, int Type,
SSecurityStack::~SSecurityStack()
{
- if (state0)
- delete state0;
- if (state1)
- delete state1;
+ delete state0;
+ delete state1;
}
bool SSecurityStack::processMsg()