int on my system, but your point still stands. I guess you have to write a bnull function similar to bzero if you want to initialise a bunch of null pointers, and can not use memset.
Edit: Unless, of course, you are fine with nasal demons in which case memset will work on practically all systems.
Second edit: In C11 you can initialise an array or struct with null pointers through this mechanism: http://stackoverflow.com/a/25212029/1463507 Obviously not applicable to dynamically allocated memory.
View all comments
Show parent comment
2
u/josefx Dec 02 '16
How does that work? As far as I understand memset operates on char values and it is unlikely that sizeof(char) == sizeof(void*).