- /* Both filters are NULL, success. */
- if (!key->filter && !event->filter) {
- goto match;
- }
-
- /* Both filters exists, check length followed by the bytecode. */
- if (event->filter->len == key->filter->len &&
- memcmp(event->filter->data, key->filter->data,
- event->filter->len) == 0) {
- goto match;
+ if (key->filter && event->filter) {
+ /* Both filters exists, check length followed by the bytecode. */
+ if (event->filter->len != key->filter->len ||
+ memcmp(event->filter->data, key->filter->data,
+ event->filter->len) != 0) {
+ goto no_match;
+ }