1
0
mirror of https://passt.top/passt synced 2024-12-22 05:35:23 +00:00

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 <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
David Gibson 2024-11-06 10:25:21 +11:00 committed by Stefano Brivio
parent 30b4f88167
commit f6b546c6e4

View File

@ -110,7 +110,7 @@ static inline const struct flowside *flowside_at_sidx(flow_sidx_t sidx)
const union flow *flow = flow_at_sidx(sidx); const union flow *flow = flow_at_sidx(sidx);
if (!flow) if (!flow)
return PIF_NONE; return NULL;
return &flow->f.side[sidx.sidei]; return &flow->f.side[sidx.sidei];
} }