mnl: fix basehook comparison
PATCH 1/1 mnl: fix basehook comparison
When comparing two hooks, if both device names are null, the comparison should return true, as they are considered equal.
Signed-off-by Donald Yandt <[email protected]>
--- src/mnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/mnl.c +1 -1
@@ -2204,7 +2204,7 @@ static bool basehook_eq(const struct basehook *prev, const struct basehook *hookif (prev->devname !=NULL && hook->devname !=NULL )return strcmp (prev->devname, hook->devname) ==0 ; -if (prev->devname ==NULL && prev->devname ==NULL ) +if (prev->devname ==NULL && hook->devname ==NULL )return true;return false;
Signature · 1 line
2.47.0
Quoted 3 lines · Donald Yandt
When comparing two hooks, if both device names are null, the comparison should return true, as they are considered equal.
Fixes b8872b83eb365 ("src: mnl: prepare for listing all device netdev device hooks")
Quoted 1 line
Signed-off-by Donald Yandt <[email protected]>
Acked-by Phil Sutter <[email protected]>
Phil Sutter
reviewerQuoted 4 lines · Donald Yandt
When comparing two hooks, if both device names are null, the comparison should return true, as they are considered equal.
Signed-off-by Donald Yandt <[email protected]>
Patch applied, thanks!