diff options
author | Explorer09 <explorer09@gmail.com> | 2016-06-02 18:30:18 +0800 |
---|---|---|
committer | Explorer09 <explorer09@gmail.com> | 2016-06-02 18:30:18 +0800 |
commit | e288f690afdef701f76b7f85e25ca6bdf647716f (patch) | |
tree | 0a409b0e46cc2039ff92263bd86ce8390169be7a /XAlloc.c | |
parent | ea9dc4ab744127f678c75c4ffeb999f5ec491d50 (diff) |
Don't check if (!str) in xStrdup
This effectively reverts "Stricter strdup." 4674b4a7320bb6b003a4e3b3840027573691e60d
If str is NULL upon the calling of strdup(), it should crash with SIGSEGV.
Just let it crash. Adding the "if (!str) fail();" code serves nothing but
bloat.
Diffstat (limited to 'XAlloc.c')
-rw-r--r-- | XAlloc.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -44,9 +44,6 @@ void* xRealloc(void* ptr, size_t size) { } char* xStrdup(const char* str) { - if (!str) { - fail(); - } char* data = strdup(str); if (!data) { fail(); |