From: Willy Tarreau Date: Tue, 17 Dec 2024 09:53:17 +0000 (+0100) Subject: CLEANUP: cache: use ASSUME_NONNULL() instead of DISGUISE() X-Git-Tag: v3.2-dev2~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=29b2c5d4d40a437c1c1ed73c92b1c8e13f1dc7c2;p=thirdparty%2Fhaproxy.git CLEANUP: cache: use ASSUME_NONNULL() instead of DISGUISE() DISGUISE() was used to avoid a NULL warning. Using ASSUME_NONNULL() instead makes it clearer and made the function slightly shorter. --- diff --git a/src/cache.c b/src/cache.c index d2cf401d62..d4d74d3a4b 100644 --- a/src/cache.c +++ b/src/cache.c @@ -820,8 +820,7 @@ cache_store_http_payload(struct stream *s, struct filter *filter, struct http_ms goto no_cache; } - /* disguise below to shut a warning on */ - DISGUISE((struct cache_entry *)st->first_block->data)->body_size += data_len; + ASSUME_NONNULL((struct cache_entry *)st->first_block->data)->body_size += data_len; ret = shctx_row_data_append(shctx, st->first_block, (unsigned char *)b_head(&trash), b_data(&trash)); if (ret < 0)