From: Tim Duesterhus Date: Fri, 25 Feb 2022 20:44:26 +0000 (+0100) Subject: CLEANUP: connection: Indicate unreachability to the compiler in conn_recv_proxy X-Git-Tag: v2.6-dev3~102 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f09af57df5f7c45ad82a11928d89a4d766d55c3b;p=thirdparty%2Fhaproxy.git CLEANUP: connection: Indicate unreachability to the compiler in conn_recv_proxy Transform the unreachability comment into a call to `my_unreachable()` to allow the compiler from benefitting from it. see d1b15b6e9 ("MINOR: proxy_protocol: Ingest PP2_TYPE_UNIQUE_ID on incoming connections") see 615f81eb5 ("MINOR: connection: Use a `struct ist` to store proxy_authority") --- diff --git a/src/connection.c b/src/connection.c index 1d53eed795..f78028451c 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1073,9 +1073,8 @@ int conn_recv_proxy(struct connection *conn, int flag) if (!isttest(conn->proxy_authority)) goto fail; if (istcpy(&conn->proxy_authority, tlv, PP2_AUTHORITY_MAX) < 0) { - /* This is technically unreachable, because we verified above - * that the TLV value fits. - */ + /* This is impossible, because we verified that the TLV value fits. */ + my_unreachable(); goto fail; } break; @@ -1087,9 +1086,8 @@ int conn_recv_proxy(struct connection *conn, int flag) if (!isttest(conn->proxy_unique_id)) goto fail; if (istcpy(&conn->proxy_unique_id, tlv, UNIQUEID_LEN) < 0) { - /* This is technically unreachable, because we verified above - * that the TLV value fits. - */ + /* This is impossible, because we verified that the TLV value fits. */ + my_unreachable(); goto fail; } break;