[Python-checkins] cpython: Get rid of unused-but-set-variable warning. len and len2 should be equal and
christian.heimes
python-checkins at python.org
Tue Apr 21 10:57:48 CEST 2015
https://hg.python.org/cpython/rev/475c6a4dfab3
changeset: 95749:475c6a4dfab3
user: Christian Heimes <christian at python.org>
date: Tue Apr 21 10:57:41 2015 +0200
summary:
Get rid of unused-but-set-variable warning. len and len2 should be equal and len2 is technically more correct, too.
files:
Modules/posixmodule.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -9891,7 +9891,7 @@
return PyErr_NoMemory();
len2 = confstr(name, buf, len);
assert(len == len2);
- result = PyUnicode_DecodeFSDefaultAndSize(buf, len-1);
+ result = PyUnicode_DecodeFSDefaultAndSize(buf, len2-1);
PyMem_Free(buf);
}
else
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list