From: Sergey Fedoseev Date: Tue, 10 Sep 2019 16:11:10 +0000 (+0500) Subject: Remove unneeded assignment in PyBytes_Concat() (GH-15274) X-Git-Tag: v3.9.0a1~582 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=afdeb189e97033b54cef44a7490d89d2013cb4e5;p=thirdparty%2FPython%2Fcpython.git Remove unneeded assignment in PyBytes_Concat() (GH-15274) The `wb.len = -1` assignment is unneeded since its introduction in 161d695fb0455ce52530d4f43a9eac4c738f64bb as `PyObject_GetBuffer` always fills it in. --- diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 72f9cd271be0..e1f5ee2f62f3 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -2935,7 +2935,6 @@ PyBytes_Concat(PyObject **pv, PyObject *w) Py_ssize_t oldsize; Py_buffer wb; - wb.len = -1; if (PyObject_GetBuffer(w, &wb, PyBUF_SIMPLE) != 0) { PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s", Py_TYPE(w)->tp_name, Py_TYPE(*pv)->tp_name);