mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 23:31:40 +02:00
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")
This commit is contained in:
parent
5a001a0e4d
commit
f09af57df5
@ -1073,9 +1073,8 @@ int conn_recv_proxy(struct connection *conn, int flag)
|
|||||||
if (!isttest(conn->proxy_authority))
|
if (!isttest(conn->proxy_authority))
|
||||||
goto fail;
|
goto fail;
|
||||||
if (istcpy(&conn->proxy_authority, tlv, PP2_AUTHORITY_MAX) < 0) {
|
if (istcpy(&conn->proxy_authority, tlv, PP2_AUTHORITY_MAX) < 0) {
|
||||||
/* This is technically unreachable, because we verified above
|
/* This is impossible, because we verified that the TLV value fits. */
|
||||||
* that the TLV value fits.
|
my_unreachable();
|
||||||
*/
|
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1087,9 +1086,8 @@ int conn_recv_proxy(struct connection *conn, int flag)
|
|||||||
if (!isttest(conn->proxy_unique_id))
|
if (!isttest(conn->proxy_unique_id))
|
||||||
goto fail;
|
goto fail;
|
||||||
if (istcpy(&conn->proxy_unique_id, tlv, UNIQUEID_LEN) < 0) {
|
if (istcpy(&conn->proxy_unique_id, tlv, UNIQUEID_LEN) < 0) {
|
||||||
/* This is technically unreachable, because we verified above
|
/* This is impossible, because we verified that the TLV value fits. */
|
||||||
* that the TLV value fits.
|
my_unreachable();
|
||||||
*/
|
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user