1
0
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:
Volker Lendecke 2021-01-24 15:40:11 +01:00
parent ce91a899a6
commit 38ebfe2e1f

View File

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