summaryrefslogtreecommitdiffstats
path: root/XAlloc.c
diff options
context:
space:
mode:
authorExplorer09 <explorer09@gmail.com>2016-06-02 18:30:18 +0800
committerExplorer09 <explorer09@gmail.com>2016-06-02 18:30:18 +0800
commite288f690afdef701f76b7f85e25ca6bdf647716f (patch)
tree0a409b0e46cc2039ff92263bd86ce8390169be7a /XAlloc.c
parentea9dc4ab744127f678c75c4ffeb999f5ec491d50 (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.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/XAlloc.c b/XAlloc.c
index 34a444f2..010d761d 100644
--- a/XAlloc.c
+++ b/XAlloc.c
@@ -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();

© 2014-2024 Faster IT GmbH | imprint | privacy policy