Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
spc476
on Feb 7, 2014
|
parent
|
context
|
favorite
| on:
Guide to Advanced Programming in C
And he didn't get all the details right.
realloc(valid_pointer,0);
IS
defined (in C89 no less) to act like free(). It is
NOT
operating system dependent.
pfacka
on Feb 7, 2014
[–]
True, but return type of free() is void, thus it says nothing about return value. The POSIX says: "If size is 0, either a null pointer or a unique pointer that can be successfully passed to free() shall be returned."
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: