[Python-checkins] bpo-36811: Fix a C compiler warning in _elementtree.c. (GH-13109)

Stefan Behnel webhook-mailer at python.org
Mon May 6 11:36:39 EDT 2019


https://github.com/python/cpython/commit/6b95149eccac540a911a5ada03fcb7d623a0de37
commit: 6b95149eccac540a911a5ada03fcb7d623a0de37
branch: master
author: Stefan Behnel <stefan_ml at behnel.de>
committer: GitHub <noreply at github.com>
date: 2019-05-06T17:36:35+02:00
summary:

bpo-36811: Fix a C compiler warning in _elementtree.c. (GH-13109)

files:
M Modules/_elementtree.c

diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index 1e58ddbfe19a..e9a0ea21b292 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -1171,7 +1171,7 @@ checkpath(PyObject* tag)
         char *p = PyBytes_AS_STRING(tag);
         const Py_ssize_t len = PyBytes_GET_SIZE(tag);
         if (len >= 3 && p[0] == '{' && (
-                p[1] == '}' || p[1] == '*' && p[2] == '}')) {
+                p[1] == '}' || (p[1] == '*' && p[2] == '}'))) {
             /* wildcard: '{}tag' or '{*}tag' */
             return 1;
         }



More information about the Python-checkins mailing list