[Python-checkins] add missing break statement (GH-12147)

Miss Islington (bot) webhook-mailer at python.org
Sun Mar 3 11:22:42 EST 2019


https://github.com/python/cpython/commit/8c17d928eb4602201d02b475caffc63340df849e
commit: 8c17d928eb4602201d02b475caffc63340df849e
branch: master
author: Inada Naoki <songofacandy at gmail.com>
committer: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
date: 2019-03-03T08:22:39-08:00
summary:

add missing break statement (GH-12147)



Bug introduced by 848037c.

files:
M Modules/_io/textio.c

diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 0f0092fd741e..8c391659ecd8 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -2363,6 +2363,8 @@ _io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence)
         cookieObj = _PyObject_CallMethodId((PyObject *)self, &PyId_tell, NULL);
         if (cookieObj == NULL)
             goto fail;
+        break;
+
     case SEEK_END:
         /* seek relative to end of file */
         cmp = PyObject_RichCompareBool(cookieObj, _PyLong_Zero, Py_EQ);
@@ -2401,8 +2403,10 @@ _io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence)
             }
         }
         return res;
+
     case SEEK_SET:
         break;
+
     default:
         PyErr_Format(PyExc_ValueError,
                      "invalid whence (%d, should be %d, %d or %d)", whence,



More information about the Python-checkins mailing list