[Python-checkins] cpython: ensure ilen is initialized when it is assigned to len

benjamin.peterson python-checkins at python.org
Mon Jan 26 15:24:46 CET 2015


https://hg.python.org/cpython/rev/1c0dc8daa280
changeset: 94320:1c0dc8daa280
user: Benjamin Peterson <benjamin at python.org>
date: Mon Jan 26 09:23:41 2015 -0500
summary:
 ensure ilen is initialized when it is assigned to len
files:
 Objects/bytesobject.c | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -870,9 +870,9 @@
 temp = format_long(iobj, flags, prec, c,
 &pbuf, &ilen);
 Py_DECREF(iobj);
- len = ilen;
 if (!temp)
 goto error;
+ len = ilen;
 sign = 1;
 }
 else {
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /