s4:pyldb.c - fix "py_ldb_contains" according to the comment by Jelmer
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Mon, 8 Nov 2010 14:24:41 +0000 (15:24 +0100)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Mon, 8 Nov 2010 14:24:41 +0000 (15:24 +0100)
source4/lib/ldb/pyldb.c

index acf80521273ca7538882ecdebe6bb53bdec5a45e..eddc56f777c2cbcd6928c9f00a14af7afb2a4214 100644 (file)
@@ -1442,13 +1442,11 @@ static int py_ldb_contains(PyLdbObject *self, PyObject *obj)
 
        talloc_free(result);
 
-       if (count == 1) {
-               return 1;
-       } else if (count == 0) {
+       if (count == 0) {
                return 0;
        }
 
-       return -1;
+       return 1;
 }
 
 static PySequenceMethods py_ldb_seq = {