mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-24 07:37:53 -04:00
CLEANUP: stats: use ASSUME_NONNULL() to indicate that the first block exists
In stats_scope_ptr(), the validity of blk() was assumed using ALREADY_CHECKED(blk), but we can now use the cleaner ASSUME_NONNULL(). In addition this simplifies the BUG_ON() check that follows.
This commit is contained in:
parent
6dfd541ca8
commit
1f93622779
1 changed files with 2 additions and 3 deletions
|
|
@ -293,9 +293,8 @@ const char *stats_scope_ptr(struct appctx *appctx)
|
|||
struct htx_blk *blk;
|
||||
struct ist uri;
|
||||
|
||||
blk = htx_get_head_blk(htx);
|
||||
BUG_ON(!blk || htx_get_blk_type(blk) != HTX_BLK_REQ_SL);
|
||||
ALREADY_CHECKED(blk);
|
||||
blk = ASSUME_NONNULL(htx_get_head_blk(htx));
|
||||
BUG_ON(htx_get_blk_type(blk) != HTX_BLK_REQ_SL);
|
||||
uri = htx_sl_req_uri(htx_get_blk_ptr(htx, blk));
|
||||
return uri.ptr + ctx->scope_str;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue