]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
add missing break statement (GH-12147)
authorInada Naoki <songofacandy@gmail.com>
Sun, 3 Mar 2019 16:22:39 +0000 (01:22 +0900)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 3 Mar 2019 16:22:39 +0000 (08:22 -0800)
Bug introduced by 848037c.

Modules/_io/textio.c

index 0f0092fd741e65155e200dc065aafc984581168c..8c391659ecd8672929918134644d4cdb4cec275d 100644 (file)
@@ -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,