bpo-36811: Fix a C compiler warning in _elementtree.c. (GH-13109) · python/cpython@6b95149

Original file line numberDiff line numberDiff line change

@@ -1171,7 +1171,7 @@ checkpath(PyObject* tag)

11711171

char *p = PyBytes_AS_STRING(tag);

11721172

const Py_ssize_t len = PyBytes_GET_SIZE(tag);

11731173

if (len >= 3 && p[0] == '{' && (

1174-

p[1] == '}' || p[1] == '*' && p[2] == '}')) {

1174+

p[1] == '}' || (p[1] == '*' && p[2] == '}'))) {

11751175

/* wildcard: '{}tag' or '{*}tag' */

11761176

return 1;

11771177

}