From f6b546c6e4f036bc569df05cf76eced3f68d6db8 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 6 Nov 2024 10:25:21 +1100 Subject: [PATCH] flow: Correct type of flowside_at_sidx() Due to a copy-pasta error, this returns 'PIF_NONE' instead of NULL on the failure case. PIF_NONE expands to 0, which turns into NULL, but it's still confusing, so fix it. This removes a clang warning. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- flow_table.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow_table.h b/flow_table.h index a499e7b..f15db53 100644 --- a/flow_table.h +++ b/flow_table.h @@ -110,7 +110,7 @@ static inline const struct flowside *flowside_at_sidx(flow_sidx_t sidx) const union flow *flow = flow_at_sidx(sidx); if (!flow) - return PIF_NONE; + return NULL; return &flow->f.side[sidx.sidei]; }