Commit 87de0ca7 authored by Raymond Hettinger's avatar Raymond Hettinger

Silence a compiler warning by supplying the correct argument type to

the htons() function.
parent 6429a472
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment