Mailing List Archive

gh-117068: Remove useless code in bytesio.c:resize_buffer() (GH-117069)
https://github.com/python/cpython/commit/63d6f2623ef2aa90f51c6a928b96845b9b380d89
commit: 63d6f2623ef2aa90f51c6a928b96845b9b380d89
branch: main
author: NGRsoftlab <78017794+NGRsoftlab@users.noreply.github.com>
committer: serhiy-storchaka <storchaka@gmail.com>
date: 2024-03-22T11:25:38Z
summary:

gh-117068: Remove useless code in bytesio.c:resize_buffer() (GH-117069)

Co-authored-by: i.khabibulin <i.khabibulin@ngrsoftlab.ru>

files:
M Modules/_io/bytesio.c

diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c
index 4a15c8e841f25f..fb66d3db0f7a1f 100644
--- a/Modules/_io/bytesio.c
+++ b/Modules/_io/bytesio.c
@@ -155,9 +155,6 @@ resize_buffer(bytesio *self, size_t size)
alloc = size + 1;
}

- if (alloc > ((size_t)-1) / sizeof(char))
- goto overflow;
-
if (SHARED_BUF(self)) {
if (unshare_buffer(self, alloc) < 0)
return -1;

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-leave@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: list-python-checkins@lists.gossamer-threads.com