Skip to main content


I have a complaint about #Plan9 #C.

I don't like that a literal 0 is accepted as a null pointer. I just spent an embarrassingly long time tracking down a segfault because in an attempt to zero out a buffer, I accidentally used memcpy(&buf, 0, sizeof(buf)) instead of memset(&buf, 0, sizeof(buf)).

The compiler should've been able to catch this.

#c #plan9

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.

⇧