mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
epmapper: Simplify endpoints_match()
strequal() deals fine with either string being NULL. We only have to take of the case where both are NULL. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org>
This commit is contained in:
parent
ce91a899a6
commit
38ebfe2e1f
@ -158,29 +158,13 @@ static bool endpoints_match(const struct dcerpc_binding *b1,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ep1 && ep2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ep1 && !ep2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ep1 && ep2) {
|
||||
if ((ep1 != NULL) || (ep2 != NULL)) {
|
||||
if (!strequal(ep1, ep2)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!h1 && h2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (h1 && !h2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (h1 && h2) {
|
||||
if ((h1 != NULL) || (h2 != NULL)) {
|
||||
if (!strequal(h1, h2)) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user