There is no need to test for null values in the hash compare
function as that we are guaranteed to send in data in
the hash compare functions.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
(cherry picked from commit
ce40c6279a46dde35e25a6d31416e4e1ce519a18)
const struct bgpevpn *vpn1 = p1;
const struct bgpevpn *vpn2 = p2;
- if (!vpn1 && !vpn2)
- return true;
- if (!vpn1 || !vpn2)
- return false;
- return (vpn1->vni == vpn2->vni);
+ return vpn1->vni == vpn2->vni;
}
int vni_list_cmp(void *p1, void *p2)