What are some flaws that drive you nuts in C APIs (including standard libraries, third party libraries, and headers inside of a project) ? The goal is to identify API design pitfalls in C, so people writing new C libraries can learn from mistakes of the past.
Explain why the flaw is bad (preferably with an example), and try to suggest an improvement. Although your solution might not be practical in real life (it's too late to fix strncpy
), it should give a heads up for future library-writers.
Although the focus of this question is C APIs, problems that affect your ability to use them in other languages are welcome.
Please give one flaw per answer, so democracy can sort the answers.