diff options
author | Guillem Jover <guillem@debian.org> | 2017-03-15 13:33:09 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2018-03-26 15:30:18 +0200 |
commit | ecab1a59e2d2e2be01c08cd9ebe1f783eb26e5ae (patch) | |
tree | c51c768e305eb21d7741b7d077d9391848c52f41 | |
parent | cd96cca4b2cf83f46d6e289418ed06e3c2ef7066 (diff) | |
download | dpkg-ecab1a59e2d2e2be01c08cd9ebe1f783eb26e5ae.tar.gz |
dselect: Assume that m_malloc() never returns NULL
The m_-prefixed functions are already taking care of that.
-rw-r--r-- | dselect/cxx-support.cc | 15 |
1 files 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 <sys/types.h> -#include <assert.h> #include <stdlib.h> #ifdef HAVE_CXXABI_H #include <cxxabi.h> @@ -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 |