]> granicus.if.org Git - python/commitdiff
bpo-36811: Fix a C compiler warning in _elementtree.c. (GH-13109)
authorStefan Behnel <stefan_ml@behnel.de>
Mon, 6 May 2019 15:36:35 +0000 (17:36 +0200)
committerGitHub <noreply@github.com>
Mon, 6 May 2019 15:36:35 +0000 (17:36 +0200)
Modules/_elementtree.c

index 1e58ddbfe19a9be14530da85b2580cd0193f76a3..e9a0ea21b292fae49f417166774a8055d89af1a7 100644 (file)
@@ -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;
         }