On 2026-02-20 15:09, Alejandro Colomar wrote:
+#define strnul(s)  strchr(s, '\0')

strnul should also be defined as a function. It shouldn't just be a type-generic macro. And once you've defined it as a function, the macro can call that function inside a _Generic wrapper (when the C compiler supports _Generic) so as to save a few bytes when the call to strnul/strchr isn't inlined.

Reply via email to