Commit e288f690 authored by Explorer09's avatar Explorer09
Browse files

Don't check if (!str) in xStrdup

This effectively reverts "Stricter strdup." 4674b4a7

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.
parent ea9dc4ab
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment