summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-06 17:50:25 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-08 11:21:27 +0000
commit9aa0ed2c3a74c6d72e42e4bc9e6077a50343fd38 (patch)
tree308e613e74655f200685519a2963671a9dbebd88 /source4/lib/ldb
parentef4861d9263d1a17396c58abc7ad0c5837a1b52c (diff)
downloadsamba-9aa0ed2c3a74c6d72e42e4bc9e6077a50343fd38.tar.gz
samba-9aa0ed2c3a74c6d72e42e4bc9e6077a50343fd38.tar.bz2
samba-9aa0ed2c3a74c6d72e42e4bc9e6077a50343fd38.zip
ldb:pyldb.c - "py_ldb_msg_element_get" - here we can safely use "unsigned int" for the element reference
We don't make use of "Py_List*" calls Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Nov 8 11:21:27 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/pyldb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index 40d7204c35..acf8052127 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -1765,10 +1765,10 @@ static PyObject *ldb_msg_element_to_set(struct ldb_context *ldb_ctx,
static PyObject *py_ldb_msg_element_get(PyLdbMessageElementObject *self, PyObject *args)
{
- int i;
- if (!PyArg_ParseTuple(args, "i", &i))
+ unsigned int i;
+ if (!PyArg_ParseTuple(args, "I", &i))
return NULL;
- if (i < 0 || i >= PyLdbMessageElement_AsMessageElement(self)->num_values)
+ if (i >= PyLdbMessageElement_AsMessageElement(self)->num_values)
Py_RETURN_NONE;
return PyObject_FromLdbValue(NULL, PyLdbMessageElement_AsMessageElement(self),