aboutsummaryrefslogtreecommitdiff
path: root/memory.h
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-03-14 13:39:51 +0100
committertomsmeding <tom.smeding@gmail.com>2017-03-14 13:41:02 +0100
commit230e9775f5b61e21aa085825fbbd0232e9a360ef (patch)
tree566ffe84fa4b57e0f77cd40f1de343669750d5ab /memory.h
parent54064158d84fc4006e651deb314cde156cc383e8 (diff)
Room listing and creation
Diffstat (limited to 'memory.h')
-rw-r--r--memory.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/memory.h b/memory.h
index 970648f..19cfb95 100644
--- a/memory.h
+++ b/memory.h
@@ -8,5 +8,8 @@
((type*)check_after_allocation("calloc",num,sizeof(type),calloc((num),sizeof(type))))
#define realloc(ptr,num,type) \
((type*)check_after_allocation("realloc",num,sizeof(type),realloc((ptr),(num)*sizeof(type))))
+#define strdup(str) \
+ ((char*)check_after_allocation_str("strdup",strdup(str)))
void* check_after_allocation(const char *func,size_t num,size_t sz,void *ptr);
+void* check_after_allocation_str(const char *func,void *ptr);