+15
−11
Loading
Currently, nvmf_rdma_listen() only supports AF_INET and AF_INET6, and will fail early if the address family is unsupported. Therefore, nvmf_rdma_trid_from_cm_id() should never encounter a sa_family that is not AF_INET or AF_INET6. This patch changes the return type to void and replaces the default case with an SPDK_ERRLOG and assert(false) to catch unreachable code paths. Change-Id: Ia56eab6df7cacf905a52e510e5ab21c25771afbd Suggested-by:Jim Harris <jim.harris@nvidia.com> Signed-off-by:
Kaiqi Chen <kaiqi.chen@smartx.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26351 Community-CI: Mellanox Build Bot Reviewed-by:
Konrad Sztyber <ksztyber@nvidia.com> Reviewed-by:
Changpeng Liu <changpeliu@tencent.com> Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com>