calloc idiocy
Posted Aug 11, 2005 13:53 UTC (Thu) by
bronson (subscriber, #4806)
Parent article:
kzalloc()
I have always thought that calloc/fwrite/etc's use of "nmemb" parameters was idiotic. Which is easier to read?
calloc(4, sizeof(t))
or
calloc(4 * sizeof(t))
For me, the latter. Especially with fwrite. And it's smaller and more general too.
Abolish nmemb!!
(
Log in to post comments)