]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
librpc: Avoid an else
authorVolker Lendecke <vl@samba.org>
Thu, 17 Mar 2022 16:14:40 +0000 (17:14 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 27 Oct 2022 18:18:36 +0000 (18:18 +0000)
With an early return; we don't need the "else"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/librpc/rpc/pyrpc.c

index 789e1748023bdca7013bacb55af19a98053e9935..7b6bcef9ebabf1d46ee8fede33cf6d0b858c1122 100644 (file)
@@ -55,7 +55,9 @@ static bool ndr_syntax_from_py_object(PyObject *object, struct ndr_syntax_id *sy
 
        if (PyUnicode_Check(object)) {
                return PyString_AsGUID(object, &syntax_id->uuid);
-       } else if (PyTuple_Check(object)) {
+       }
+
+       if (PyTuple_Check(object)) {
                PyObject *item = NULL;
                if (PyTuple_Size(object) < 1 || PyTuple_Size(object) > 2) {
                        PyErr_SetString(PyExc_ValueError, "Syntax ID tuple has invalid size");