Skip to content

Commit cd40d77

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

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
@@ -522,12 +522,10 @@ static PyObject *
522522
_io_BytesIO_peek_impl(bytesio *self, Py_ssize_t size)
523523
/*[clinic end generated code: output=fa4d8ce28b35db9b input=cb06614a3ed0496e]*/
524524
{
525-
Py_ssize_t n;
526-
527525
CHECK_CLOSED(self);
528526

529527
/* adjust invalid sizes */
530-
n = self->string_size - self->pos;
528+
Py_ssize_t n = self->string_size - self->pos;
531529
if (size < 1 || size > n) {
532530
size = n;
533531
/* size can be negative after truncate() */

0 commit comments

Comments
 (0)