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>
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;