aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-03-12 14:42:25 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-03-12 14:42:25 +0100
commitfb8d8f5428ec37a40656d64d9190fdc32b0c769b (patch)
tree1b3f0acd19658a23fa74eeb2ba55a602c7d501b1 /src
parent006f24c7faf146d97742c1d7cc270ec107fa2e56 (diff)
Remove unnecessary null pointer checks
Fixes #225.
Diffstat (limited to 'src')
-rw-r--r--src/libutil/serialise.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/serialise.cc b/src/libutil/serialise.cc
index 1f817a869..6b71f52c1 100644
--- a/src/libutil/serialise.cc
+++ b/src/libutil/serialise.cc
@@ -13,7 +13,7 @@ BufferedSink::~BufferedSink()
/* We can't call flush() here, because C++ for some insane reason
doesn't allow you to call virtual methods from a destructor. */
assert(!bufPos);
- if (buffer) delete[] buffer;
+ delete[] buffer;
}
@@ -71,7 +71,7 @@ void Source::operator () (unsigned char * data, size_t len)
BufferedSource::~BufferedSource()
{
- if (buffer) delete[] buffer;
+ delete[] buffer;
}