mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Silence a compiler warning by supplying the correct argument type to
the htons() function.
This commit is contained in:
parent
6429a4727e
commit
87de0ca741
1 changed files with 2 additions and 2 deletions
|
@ -2944,10 +2944,10 @@ otherwise any protocol will match.");
|
|||
static PyObject *
|
||||
socket_getservbyport(PyObject *self, PyObject *args)
|
||||
{
|
||||
int port;
|
||||
unsigned short port;
|
||||
char *proto=NULL;
|
||||
struct servent *sp;
|
||||
if (!PyArg_ParseTuple(args, "i|s:getservbyport", &port, &proto))
|
||||
if (!PyArg_ParseTuple(args, "H|s:getservbyport", &port, &proto))
|
||||
return NULL;
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sp = getservbyport(htons(port), proto);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue