diff options
| author | Donald Yandt <donald.yandt@gmail.com> | 2024-11-22 17:04:49 -0500 |
|---|---|---|
| committer | Phil Sutter <phil@nwl.cc> | 2024-11-29 17:24:11 +0100 |
| commit | 9819e717e8c31a80be2a12923e37fad99c378c91 (patch) | |
| tree | ca6247a555bac1d397c5f99c5f0c3b4b14d4fabb | |
| parent | 9de8ec88cde86c5576ecf862f06be945f4042071 (diff) | |
mnl: fix basehook comparison
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")
Signed-off-by: Donald Yandt <donald.yandt@gmail.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
| -rw-r--r-- | src/mnl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |
