Skip to contentSkip to conversation

mnl: fix basehook comparison

PATCH In review Donald Yandt 2 participants 3 messages Nov 22, 2024 – Nov 29, 2024 netfilter

lore
Share & tools
lore
#0 lore raw

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.

---
 src/mnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/mnl.c +1 -1
index 828006c4..88fac5bd 100644
@@ -2204,7 +2204,7 @@ static bool basehook_eq(const struct basehook *prev, const struct basehook *hook
 	if (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