Y
Hacker News
new
|
ask
|
show
|
jobs
by
e4m2
436 days ago
According to the standard `realloc(NULL, size)` should already behave like `malloc(size)`. You shouldn't need that special case unless you're working on a system with a very buggy/non-compliant libc.