4 ms·
Passing sizeof(value) to malloc is really fine. But I consider the typedef of a pointer to a node is to the same identifier as the node itself to be pretty bad.
by Matthias247 8y ago
Passing sizeof(value) to malloc is really fine. But I consider the typedef of a pointer to a node is to the same identifier as the node itself to be pretty bad.
It's confusing for readers and new team members. And can even lead to strange when someone forgets to type "struct".