Skip to content

Commit 1f2b5c5

Browse files
Update Modules/_io/bytesio.c
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
1 parent 4c3c908 commit 1f2b5c5

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Modules/_io/bytesio.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,12 +485,10 @@ static PyObject *
485485
_io_BytesIO_peek_impl(bytesio *self, Py_ssize_t size)
486486
/*[clinic end generated code: output=fa4d8ce28b35db9b input=cb06614a3ed0496e]*/
487487
{
488-
Py_ssize_t n;
489-
490488
CHECK_CLOSED(self);
491489

492490
/* adjust invalid sizes */
493-
n = self->string_size - self->pos;
491+
Py_ssize_t n = self->string_size - self->pos;
494492
if (size < 1 || size > n) {
495493
size = n;
496494
/* size can be negative after truncate() */

0 commit comments

Comments
 (0)