1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

pyrpc4: Simplify py_ndr_syntax_id() with GUID_buf_string()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2022-03-17 17:18:21 +01:00 committed by Jeremy Allison
parent a91ff509fd
commit 53d1b188e8

View File

@ -101,15 +101,12 @@ static PyObject *py_iface_server_name(PyObject *obj, void *closure)
static PyObject *py_ndr_syntax_id(struct ndr_syntax_id *syntax_id)
{
PyObject *ret;
char *uuid_str;
struct GUID_txt_buf buf;
uuid_str = GUID_string(NULL, &syntax_id->uuid);
if (uuid_str == NULL)
return NULL;
ret = Py_BuildValue("(s,i)", uuid_str, syntax_id->if_version);
talloc_free(uuid_str);
ret = Py_BuildValue(
"(s,i)",
GUID_buf_string(&syntax_id->uuid, &buf),
syntax_id->if_version);
return ret;
}