Skip to content

Commit 2b7ac5a

Browse files
committed
Drop the AF_VSOCK type check, PyArg_Parse already validates
1 parent f050971 commit 2b7ac5a

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

‎Modules/socketmodule.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3420,12 +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-
return NULL;
3428-
}
34293423
uint64_t vflag; // Must be set width of 64 bits
34303424
/* setsockopt(level, opt, flag) */
34313425
if (!PyArg_Parse(optval, "K", &vflag)) {

0 commit comments

Comments
 (0)