Commit 32071dcb authored by Jeremy Hylton's avatar Jeremy Hylton

Convert K&R declaration to Std C prototype.

Silence warnings.
Add :name to PyArg_ParseTuple() call.
parent 6cdcac62
......@@ -20,17 +20,15 @@
#include <unistd.h>
static PyObject *
initgroups_initgroups(self, args)
PyObject *self;
PyObject *args;
initgroups_initgroups(PyObject *self, PyObject *args)
{
char *username;
gid_t gid;
if(!PyArg_ParseTuple(args, "sl", &username, &gid))
if (!PyArg_ParseTuple(args, "sl:initgroups", &username, &gid))
return NULL;
if(initgroups(username, gid) == -1)
if (initgroups(username, gid) == -1)
return PyErr_SetFromErrno(PyExc_OSError);
Py_INCREF(Py_None);
......@@ -53,8 +51,8 @@ static PyMethodDef InitgroupsMethods[] = {
#endif /* defined(__unix__) || defined(unix) */
void
initinitgroups()
initinitgroups(void)
{
(void)Py_InitModule("initgroups", InitgroupsMethods);
Py_InitModule("initgroups", InitgroupsMethods);
}
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