From: Volker Lendecke Date: Sun, 24 Jan 2021 14:07:47 +0000 (+0100) Subject: librpc: Simplify dcerpc_binding_string() X-Git-Tag: tevent-0.11.0~1875 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4df6c594c68dc5c2bfeb8e897f2226304da4848b;p=thirdparty%2Fsamba.git librpc: Simplify dcerpc_binding_string() Signed-off-by: Volker Lendecke Reviewed-by: Samuel Cabrero --- diff --git a/librpc/rpc/binding.c b/librpc/rpc/binding.c index d4ca43e8066..7e20966b121 100644 --- a/librpc/rpc/binding.c +++ b/librpc/rpc/binding.c @@ -265,19 +265,13 @@ _PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_bi } } - if (b->endpoint) { - option_section = true; - } else if (target_hostname) { - option_section = true; - } else if (b->target_principal) { - option_section = true; - } else if (b->assoc_group_id != 0) { - option_section = true; - } else if (b->options) { - option_section = true; - } else if (b->flags) { - option_section = true; - } + option_section = + (b->endpoint != NULL) || + (target_hostname != NULL) || + (b->target_principal != NULL) || + (b->assoc_group_id != 0) || + (b->options != NULL) || + (b->flags != 0); if (!option_section) { return s;