From 60c708933447c516f706463ea283195fe460f736 Mon Sep 17 00:00:00 2001 From: "L. Pereira" Date: Sat, 3 Aug 2024 13:00:33 -0700 Subject: [PATCH] Fix unit tests --- src/lib/lwan-cache.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/lwan-cache.c b/src/lib/lwan-cache.c index 3e1ce6152..4c07f6f66 100644 --- a/src/lib/lwan-cache.c +++ b/src/lib/lwan-cache.c @@ -199,7 +199,11 @@ struct cache_entry *cache_get_and_ref_entry_with_ctx(struct cache *cache, assert(cache); assert(error); - assert(key); +#ifndef NDEBUG + if (cache->key.copy != identity_key_copy) { + assert(key); + } +#endif *error = 0;