Skip to content

Commit

Permalink
Remove unneeded assignment in PyBytes_Concat() (GH-15274)
Browse files Browse the repository at this point in the history
The `wb.len = -1` assignment is unneeded since its introduction in 161d695 as `PyObject_GetBuffer` always fills it in.
  • Loading branch information
sir-sigurd authored and gpshead committed Sep 10, 2019
1 parent 9cbb97b commit afdeb18
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Objects/bytesobject.c
Expand Up @@ -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);
Expand Down

0 comments on commit afdeb18

Please sign in to comment.