From ecab1a59e2d2e2be01c08cd9ebe1f783eb26e5ae Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 15 Mar 2017 13:33:09 +0100 Subject: dselect: Assume that m_malloc() never returns NULL The m_-prefixed functions are already taking care of that. --- dselect/cxx-support.cc | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/dselect/cxx-support.cc b/dselect/cxx-support.cc index 35f2543f2..dc3b36d34 100644 --- a/dselect/cxx-support.cc +++ b/dselect/cxx-support.cc @@ -24,7 +24,6 @@ #include -#include #include #ifdef HAVE_CXXABI_H #include @@ -37,23 +36,13 @@ extern void * operator new(size_t size) DPKG_ATTR_THROW(std::bad_alloc) { - void *p; - - p = m_malloc(size); - assert(p); - - return p; + return m_malloc(size); } extern void * operator new[](size_t size) DPKG_ATTR_THROW(std::bad_alloc) { - void *p; - - p = m_malloc(size); - assert(p); - - return p; + return m_malloc(size); } extern void -- cgit v1.2.3