Browse Source

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

pull/13118/head
Stefan Behnel 7 years ago
committed by GitHub
parent
commit
6b95149ecc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Modules/_elementtree.c

2
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;
}

Loading…
Cancel
Save