Don't dereference a known-to-be-null pointer.

In dump_dfilter_macro_t(), if the dfilter_macro_t pointer is null, just
give up after printing the message that indicates that.

This should squelch several nullPointerRedundantCheck warnings from
cppcheck.
This commit is contained in:
Guy Harris 2021-01-20 01:07:18 -08:00
parent 28d89773fb
commit 05b9e53777
1 changed files with 1 additions and 0 deletions

View File

@ -612,6 +612,7 @@ void dump_dfilter_macro_t(const dfilter_macro_t *m, const char *function, const
if(m == NULL) {
ws_debug_printf(" dfilter_macro_t * == NULL! (via: %s(): %s:%d)\n", function, file, line);
ws_debug_printf("\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
return;
}
ws_debug_printf("DUMP of dfilter_macro_t: %p (via: %s(): %s:%d)\n", m, function, file, line);