diff options
author | Benny Baumann <BenBE@geshi.org> | 2020-09-18 20:39:50 +0200 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2020-09-29 17:41:31 +0200 |
commit | 736c496dbf15c1a665ba7e0b03d7994117a0b215 (patch) | |
tree | b5397abdcd0a1b27a128dd267b101a76b8df6b9f | |
parent | 8b55113ea8924d6e4ace14a3d54c9d9aca23eaa7 (diff) |
Cleanse xStrdup mess
-rw-r--r-- | XAlloc.c | 2 | ||||
-rw-r--r-- | XAlloc.h | 10 |
2 files changed, 2 insertions, 10 deletions
@@ -67,7 +67,7 @@ int xSnprintf(char* buf, int len, const char* fmt, ...) { return _n; } -char* xStrdup_(const char* str) { +char* xStrdup(const char* str) { char* data = strdup(str); if (!data) { fail(); @@ -25,14 +25,6 @@ int xAsprintf(char **strp, const char* fmt, ...); ATTR_FORMAT(printf, 3, 4) int xSnprintf(char *buf, int len, const char* fmt, ...); -#undef xStrdup -#undef xStrdup_ -#ifdef NDEBUG -# define xStrdup_ xStrdup -#else -# define xStrdup(str_) (assert(str_), xStrdup_(str_)) -#endif - -char* xStrdup_(const char* str) ATTR_NONNULL; +char* xStrdup(const char* str) ATTR_NONNULL; #endif |