From: Martti Rannanjärvi Date: Tue, 28 Aug 2018 09:00:54 +0000 (+0300) Subject: lib: Use i_asserts() for NULL-checks in test_event_filter_inc_int() X-Git-Tag: 2.3.4~138 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8777bde15518ca39406a269dedfa9218a15cd580;p=thirdparty%2Fdovecot%2Fcore.git lib: Use i_asserts() for NULL-checks in test_event_filter_inc_int() This is so scan-build doesn't explore the assertations not holding and create noise with that. --- diff --git a/src/lib/test-event-filter.c b/src/lib/test-event-filter.c index f477fc7dca..4a1e77e210 100644 --- a/src/lib/test-event-filter.c +++ b/src/lib/test-event-filter.c @@ -120,13 +120,13 @@ static void test_event_filter_inc_int(void) event_filter_add(filter, &query); const struct event_field *f = event_find_field(root, "int"); - test_assert(f == NULL); + i_assert(f == NULL); test_assert(!event_filter_match(filter, root, &failure_ctx)); event_inc_int(root, "int", 7); test_assert(!event_filter_match(filter, root, &failure_ctx)); f = event_find_field(root, "int"); - test_assert(f != NULL); + i_assert(f != NULL); test_assert_strcmp(f->key, "int"); test_assert(f->value_type == EVENT_FIELD_VALUE_TYPE_INTMAX); test_assert(f->value.intmax == 7); @@ -134,7 +134,7 @@ static void test_event_filter_inc_int(void) event_inc_int(root, "int", 7); test_assert(event_filter_match(filter, root, &failure_ctx)); f = event_find_field(root, "int"); - test_assert(f != NULL); + i_assert(f != NULL); test_assert_strcmp(f->key, "int"); test_assert(f->value_type == EVENT_FIELD_VALUE_TYPE_INTMAX); test_assert(f->value.intmax == 14);