diff options
author | Volker Lendecke <vl@samba.org> | 2021-01-27 13:54:25 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2021-01-28 16:58:35 +0000 |
commit | ecd95fc55eb793cfbbe233bd91664b6d646d430f (patch) | |
tree | 253d6eec95209049678a3c5dc01c55f49b77d72b /librpc | |
parent | 9c1d7632e35dc28061ff8bce51f162af35bfa4cb (diff) | |
download | samba-ecd95fc55eb793cfbbe233bd91664b6d646d430f.tar.gz |
librpc: Simplify find_interface_by_syntax_id()
Directly use ndr_syntax_id_equal() instead of duplicating it with
interface_match_by_uuid().
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/rpc/dcesrv_core.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/librpc/rpc/dcesrv_core.c b/librpc/rpc/dcesrv_core.c index 52008227242..5db37ca6716 100644 --- a/librpc/rpc/dcesrv_core.c +++ b/librpc/rpc/dcesrv_core.c @@ -137,16 +137,6 @@ static const struct dcesrv_interface *find_interface_by_binding(struct dcesrv_co } /* - see if a uuid and if_version match to an interface -*/ -static bool interface_match_by_uuid(const struct dcesrv_interface *iface, - const struct GUID *uuid, uint32_t if_version) -{ - return (iface->syntax_id.if_version == if_version && - GUID_equal(&iface->syntax_id.uuid, uuid)); -} - -/* find the interface operations on an endpoint by uuid */ _PUBLIC_ const struct dcesrv_interface *find_interface_by_syntax_id( @@ -155,10 +145,7 @@ _PUBLIC_ const struct dcesrv_interface *find_interface_by_syntax_id( { struct dcesrv_if_list *ifl; for (ifl=endpoint->interface_list; ifl; ifl=ifl->next) { - if (interface_match_by_uuid( - ifl->iface, - &interface->uuid, - interface->if_version)) { + if (ndr_syntax_id_equal(&ifl->iface->syntax_id, interface)) { return ifl->iface; } } |