]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
librpc: Simplify dcerpc_binding_set_abstract_syntax()
authorVolker Lendecke <vl@samba.org>
Fri, 22 Jan 2021 19:01:27 +0000 (20:01 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 28 Jan 2021 16:58:35 +0000 (16:58 +0000)
It might be a question of style, but I find it simpler this way.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
librpc/rpc/binding.c

index 57ceed012f4e45605511592faaed8f3851f410bc..d4ca43e806662072910d9aae5283b6d0729dfa18 100644 (file)
@@ -652,20 +652,12 @@ _PUBLIC_ NTSTATUS dcerpc_binding_set_abstract_syntax(struct dcerpc_binding *b,
 
        if (syntax == NULL) {
                status = dcerpc_binding_set_string_option(b, "abstract_syntax", NULL);
-               if (!NT_STATUS_IS_OK(status)) {
-                       return status;
-               }
-
-               return NT_STATUS_OK;
+               return status;
        }
 
        if (ndr_syntax_id_equal(&ndr_syntax_id_null, syntax)) {
                status = dcerpc_binding_set_string_option(b, "abstract_syntax", NULL);
-               if (!NT_STATUS_IS_OK(status)) {
-                       return status;
-               }
-
-               return NT_STATUS_OK;
+               return status;
        }
 
        status = dcerpc_binding_set_string_option(