From: Vladimír Čunát Date: Thu, 15 Apr 2021 12:28:35 +0000 (+0200) Subject: treewide: eradicate "assert" in comments to fix CI X-Git-Tag: v5.4.0~18^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63f199a1d6318a9fc6f0a28c64e23a479e267a2d;p=thirdparty%2Fknot-resolver.git treewide: eradicate "assert" in comments to fix CI --- diff --git a/daemon/tls_session_ticket-srv.c b/daemon/tls_session_ticket-srv.c index b1622fac1..315eb48e1 100644 --- a/daemon/tls_session_ticket-srv.c +++ b/daemon/tls_session_ticket-srv.c @@ -224,7 +224,7 @@ tst_ctx_t * tls_session_ticket_ctx_create(uv_loop_t *loop, const char *secret, if (!kr_assume(loop && (!secret_len || secret))) return NULL; #if GNUTLS_VERSION_NUMBER < 0x030500 - /* We would need different SESSION_KEY_SIZE; avoid assert. */ + /* We would need different SESSION_KEY_SIZE; avoid an error. */ return NULL; #endif tst_ctx_t *ctx = tst_key_create(secret, secret_len, loop); diff --git a/lib/cache/impl.h b/lib/cache/impl.h index 53b9699b1..670361700 100644 --- a/lib/cache/impl.h +++ b/lib/cache/impl.h @@ -341,7 +341,7 @@ enum { /** Materialize RRset + RRSIGs into ans->rrsets[id]. * LATER(optim.): it's slightly wasteful that we allocate knot_rrset_t for the packet * - * \return error code. They are all bad conditions and "guarded" by assert. + * \return error code. They are all bad conditions and "guarded" by kr_assume(). */ int entry2answer(struct answer *ans, int id, const struct entry_h *eh, const uint8_t *eh_bound, diff --git a/lib/test_zonecut.c b/lib/test_zonecut.c index 0c85b0c69..a00aa9f67 100644 --- a/lib/test_zonecut.c +++ b/lib/test_zonecut.c @@ -16,7 +16,7 @@ static void test_zonecut_params(void **state) kr_zonecut_deinit(NULL); kr_zonecut_set(NULL, NULL); kr_zonecut_set(&cut, NULL); - /* TODO triggerring inner assert: + /* TODO triggerring inner assertion: assert_int_not_equal(kr_zonecut_add(NULL, NULL, NULL, 0), 0); */ assert_null((void *)kr_zonecut_find(NULL, NULL)); diff --git a/lib/utils.h b/lib/utils.h index fa53c1a58..82bcf66e4 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -46,7 +46,7 @@ typedef void (*trace_log_f)(const struct kr_request *request, const char *msg); #define kr_log_critical(...) kr_log_error(__VA_ARGS__) #define kr_log_deprecate(...) fprintf(stderr, "deprecation WARNING: " __VA_ARGS__) -/** assert() but always, regardless of -DNDEBUG. See also kr_assume(). */ +/** Assert() but always, regardless of -DNDEBUG. See also kr_assume(). */ #define kr_require(expression) do { if (!(expression)) { \ kr_fail(true, #expression, __func__, __FILE__, __LINE__); \ __builtin_unreachable(); /* aid code analysis */ \