News for hackers. Stuff that matters.
Re:A critique of "How to C in 2016" by Anilm3 on Friday January 15, 2016 @07:52AM (#10908965)
I don't see the point of the discussion, that piece of code (or relatively equivalent), is already being performed by a libC function (calloc, in this case), how is that less convenient than you writing it yourself?

It has nothing to do with how smart you are or how low level C is, you are effectively reinventing that part of calloc by wrapping malloc.

Re:A critique of "How to C in 2016" by masklinn on Saturday January 16, 2016 @05:31AM (#10914936)
There's a point to be made that people will be idiots and risk bugs for the sake of efficiency.

That's why OpenBSD has reallocarray(3) (which serves as a fine malloc, though the kernel not having reallocation has mallocarray(9))