From: Douglas Bagnall Date: Sun, 7 Jul 2019 00:14:50 +0000 (+1200) Subject: pysecurity: use unsigned int, not int to approximate uint32_t X-Git-Tag: tdb-1.4.2~577 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=95a5140db3e84478b903f9e96fc34e87db2c07c6;p=thirdparty%2Fsamba.git pysecurity: use unsigned int, not int to approximate uint32_t the "I" flag for unsigned int has been available since Python 2.3 Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- diff --git a/libcli/security/pysecurity.c b/libcli/security/pysecurity.c index 38d502afb61..fcef6007d54 100644 --- a/libcli/security/pysecurity.c +++ b/libcli/security/pysecurity.c @@ -33,12 +33,12 @@ static PyObject *py_se_access_check(PyObject *module, PyObject *args, PyObject * PyObject *py_security_token = Py_None; struct security_descriptor *security_descriptor; struct security_token *security_token; - int access_desired; /* This is an int, because that's what - * we need for the python - * PyArg_ParseTupleAndKeywords */ + unsigned int access_desired; /* This is an unsigned int, not uint32_t, + * because that's what we need for the + * python PyArg_ParseTupleAndKeywords */ uint32_t access_granted; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOi", + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOI", discard_const_p(char *, kwnames), &py_sec_desc, &py_security_token, &access_desired)) { return NULL;