Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8714cfd

Browse files
committed
Get rid of unused-but-set-variable warning. len and len2 should be equal and len2 is technically more correct, too.
1 parent 4d9d256 commit 8714cfd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9891,7 +9891,7 @@ os_confstr_impl(PyModuleDef *module, int name)
98919891
return PyErr_NoMemory();
98929892
len2 = confstr(name, buf, len);
98939893
assert(len == len2);
9894-
result = PyUnicode_DecodeFSDefaultAndSize(buf, len-1);
9894+
result = PyUnicode_DecodeFSDefaultAndSize(buf, len2-1);
98959895
PyMem_Free(buf);
98969896
}
98979897
else

0 commit comments

Comments
 (0)