Don't check if (!str) in xStrdup

This effectively reverts "Stricter strdup." 4674b4a732

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.
This commit is contained in:
Explorer09 2016-06-02 18:30:18 +08:00
parent ea9dc4ab74
commit e288f690af
1 changed files with 0 additions and 3 deletions

View File

@ -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();