Skip to content

Commit 03a3f3d

Browse files
authored
fixes gh-159561: Remove redundant type check in AF_VSOCK setsockopt() (#159610)
1 parent 2188f9b commit 03a3f3d

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎Modules/socketmodule.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3420,11 +3420,6 @@ sock_setsockopt(PyObject *self, PyObject *args)
34203420

34213421
#ifdef AF_VSOCK
34223422
if (s->sock_family == AF_VSOCK) {
3423-
if (!PyIndex_Check(optval)) {
3424-
PyErr_Format(PyExc_TypeError,
3425-
"setsockopt() argument 3 for AF_VSOCK must be an int (got %T)",
3426-
optval);
3427-
}
34283423
uint64_t vflag; // Must be set width of 64 bits
34293424
/* setsockopt(level, opt, flag) */
34303425
if (!PyArg_Parse(optval, "K", &vflag)) {

0 commit comments

Comments
 (0)