Home

Search IconIcon to open search

C pitfalls

Using f() instead of f(void) in C++ they’re equivalent, but not in C. In C f() is a function with unspecified arguments. See this.

Using strlcpy is inefficient, see Strings in C.

Needless to say, a NULL pointer deref is the ultimate footgun in C.