summaryrefslogtreecommitdiff
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-03-14 10:47:27 +0200
committerGitHub <noreply@github.com>2019-03-14 10:47:27 +0200
commit783bed4c8daf65a2893d94761ea44af4e3718f4f (patch)
treecf5ce9cca23905968219200014eef4e7506b7563 /Modules/socketmodule.c
parenta84f9bc11c3ce4854f7b4e16f3cb3cca954092f6 (diff)
downloadcpython-git-783bed4c8daf65a2893d94761ea44af4e3718f4f.tar.gz
[3.7] bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264). (GH-12322)
(cherry picked from commit d53fe5f407ff4b529628b01a1bcbf21a6aad5c3a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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 988471e15f..65385e8974 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -4102,7 +4102,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;
}
@@ -4642,7 +4642,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;
}
}