diff --git a/src/report.c b/src/report.c index 8f8bf39..64a6861 100644 --- a/src/report.c +++ b/src/report.c @@ -33,13 +33,15 @@ #include "config.h" #include "posix-compat.h" +static inline void nothing() {} + #define IMPL_CALL_REPORT_HOOKS(Kind) \ IMPL_SECTION_LIMITS(f_report_hook, HOOK_SECTION(Kind)); \ void call_report_hooks_##Kind(void *data) { \ for (f_report_hook *hook = GET_SECTION_START(HOOK_SECTION(Kind)); \ hook < (f_report_hook*) GET_SECTION_END(HOOK_SECTION(Kind)); \ ++hook) { \ - (*hook)(data); \ + (*hook ?: nothing)(data); \ } \ }