summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-03-13 20:59:55 (GMT)
committerGitHub <noreply@github.com>2019-03-13 20:59:55 (GMT)
commitd53fe5f407ff4b529628b01a1bcbf21a6aad5c3a (patch)
treedb8a8657e379e60b26fe2bfdbad4da612fbb46b9 /Modules/socketmodule.c
parent10f8ce66884cd7fee2372b8dae08ca8132091574 (diff)
downloadcpython-d53fe5f407ff4b529628b01a1bcbf21a6aad5c3a.zip
cpython-d53fe5f407ff4b529628b01a1bcbf21a6aad5c3a.tar.gz
cpython-d53fe5f407ff4b529628b01a1bcbf21a6aad5c3a.tar.bz2
bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264)
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 8c3c2fa..1120f6b 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -4198,7 +4198,7 @@ sock_sendto(PySocketSockObject *s, PyObject *args)
break;
default:
PyErr_Format(PyExc_TypeError,
- "sendto() takes 2 or 3 arguments (%d given)",
+ "sendto() takes 2 or 3 arguments (%zd given)",
arglen);
return NULL;
}
@@ -4741,7 +4741,7 @@ sock_ioctl(PySocketSockObject *s, PyObject *arg)
return PyLong_FromUnsignedLong(recv); }
#endif
default:
- PyErr_Format(PyExc_ValueError, "invalid ioctl command %d", cmd);
+ PyErr_Format(PyExc_ValueError, "invalid ioctl command %lu", cmd);
return NULL;
}
}