]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Silenced a compiler warning in the sqlite module
authorChristian Heimes <christian@cheimes.de>
Fri, 22 Aug 2008 19:55:54 +0000 (19:55 +0000)
committerChristian Heimes <christian@cheimes.de>
Fri, 22 Aug 2008 19:55:54 +0000 (19:55 +0000)
Modules/_sqlite/row.c:187: warning: suggest parentheses around && within ||
Reviewed by Benjamin Peterson

Misc/NEWS
Modules/_sqlite/row.c

index 0a328bde66c5943be8fa7b121ccf3cab3f568ba6..e5b37a95b0a2a9701984609021bac475a3761a28 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -21,6 +21,8 @@ Core and Builtins
 Library
 -------
 
+- Silenced a trivial compiler warning in the sqlite module.
+
 
 What's New in Python 2.6 beta 3?
 ================================
index 34192673a63b2a677a9772aba158d1f31db0bbed..f1e1c43c52ce34a00cdeff91bd69772ee1c482e9 100644 (file)
@@ -183,8 +183,8 @@ static PyObject* pysqlite_row_richcompare(pysqlite_Row *self, PyObject *_other,
     if (PyType_IsSubtype(Py_TYPE(_other), &pysqlite_RowType)) {
        pysqlite_Row *other = (pysqlite_Row *)_other;
        PyObject *res = PyObject_RichCompare(self->description, other->description, opid);
-       if (opid == Py_EQ && res == Py_True
-           || opid == Py_NE && res == Py_False) {
+       if ((opid == Py_EQ && res == Py_True)
+           || (opid == Py_NE && res == Py_False)) {
            Py_DECREF(res);
            return PyObject_RichCompare(self->data, other->data, opid);
        }