From: Volker Lendecke Date: Thu, 17 Mar 2022 16:14:40 +0000 (+0100) Subject: librpc: Avoid an else X-Git-Tag: talloc-2.4.0~633 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=167bc2cfc5d7cd3997fb08e64a27f63774e27a75;p=thirdparty%2Fsamba.git librpc: Avoid an else With an early return; we don't need the "else" Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c index 789e1748023..7b6bcef9eba 100644 --- a/source4/librpc/rpc/pyrpc.c +++ b/source4/librpc/rpc/pyrpc.c @@ -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");