diff options
author | Volker Lendecke <vl@samba.org> | 2021-01-24 15:07:47 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2021-01-28 16:58:35 +0000 |
commit | 4df6c594c68dc5c2bfeb8e897f2226304da4848b (patch) | |
tree | 77ae19c432ed0d5a66918cb92f462f8b53514fc7 /librpc | |
parent | 895f459b4b2f347223f5b524d6b79090654cd1f4 (diff) | |
download | samba-4df6c594c68dc5c2bfeb8e897f2226304da4848b.tar.gz |
librpc: Simplify dcerpc_binding_string()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/rpc/binding.c | 20 |
1 files changed, 7 insertions, 13 deletions
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; |