summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2017-03-15 13:33:09 +0100
committerGuillem Jover <guillem@debian.org>2018-03-26 15:30:18 +0200
commitecab1a59e2d2e2be01c08cd9ebe1f783eb26e5ae (patch)
treec51c768e305eb21d7741b7d077d9391848c52f41
parentcd96cca4b2cf83f46d6e289418ed06e3c2ef7066 (diff)
downloaddpkg-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.cc15
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