summaryrefslogtreecommitdiff
path: root/src/wrapper/wrapper.c
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-02-25 15:34:24 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2018-02-25 15:34:24 +0200
commit412dac3ee4ba790a38a8a127ae947e05afcf6c06 (patch)
treec6523e94404af738085196859822732b76cd25fc /src/wrapper/wrapper.c
parentfb212eaa87d94f48d65925713b5a5bbf33eebf8b (diff)
wrapper: Add asserts
Diffstat (limited to 'src/wrapper/wrapper.c')
-rw-r--r--src/wrapper/wrapper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wrapper/wrapper.c b/src/wrapper/wrapper.c
index 3acef77..a78026d 100644
--- a/src/wrapper/wrapper.c
+++ b/src/wrapper/wrapper.c
@@ -36,6 +36,8 @@ static union {
static void
trace(const char *const symbol)
{
+ assert(symbol);
+
if (__cxa_demangle.ptr) {
// >If output_buffer is not long enough, it is expanded using realloc
// Holy fuck gcc what the fuck? Guess we don't use stack then, thanks
@@ -57,6 +59,7 @@ trace(const char *const symbol)
void*
wrapper_create(const char *const symbol, void *function)
{
+ assert(symbol && function);
#ifdef WRAPPER_TRACE
if (!__cxa_demangle.ptr)
__cxa_demangle.ptr = dlsym(RTLD_DEFAULT, "__cxa_demangle");