From fb8d8f5428ec37a40656d64d9190fdc32b0c769b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 12 Mar 2014 14:42:25 +0100 Subject: [PATCH] Remove unnecessary null pointer checks Fixes #225. --- src/libutil/serialise.cc | 4 ++-- 1 file 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; }