From afdeb189e97033b54cef44a7490d89d2013cb4e5 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Tue, 10 Sep 2019 21:11:10 +0500 Subject: [PATCH] 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. --- Objects/bytesobject.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 72f9cd271b..e1f5ee2f62 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); -- 2.40.0