Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 13651:8a063423e0b7 legacy-trunk
Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',
and a couple of functions that were missed in the previous batches. Not
terribly tested, but very carefully scrutinized, three times.
All these were found by the little findkrc.py that I posted to python-dev,
which means there might be more lurking. Cases such as this:
long
func(a, b)
long a;
long b; /* flagword */
{
and other cases where the last ; in the argument list isn't followed by a
newline and an opening curly bracket. Regexps to catch all are welcome, of
course ;)
| author | Thomas Wouters <thomas@python.org> |
|---|---|
| date | Fri, 21 Jul 2000 06:00:07 +0000 |
| parents | 906efc1da247 |
| children | a6c7bfdd6777 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Fri Jul 21 05:19:59 2000 +0000 +++ b/Modules/socketmodule.c Fri Jul 21 06:00:07 2000 +0000 @@ -228,7 +228,7 @@ and return a NULL pointer from a function. */ static PyObject * -PySocket_Err() +PySocket_Err(void) { #ifdef MS_WINDOWS if (WSAGetLastError()) { @@ -1437,9 +1437,7 @@ /* Convenience function common to gethostbyname_ex and gethostbyaddr */ static PyObject * -gethost_common(h, addr) - struct hostent *h; - struct sockaddr_in *addr; +gethost_common(struct hostent *h, struct sockaddr_in *addr) { char **pch; PyObject *rtn_tuple = (PyObject *)NULL; @@ -2185,13 +2183,13 @@ /* Additional initialization and cleanup for NT/Windows */ static void -NTcleanup() +NTcleanup(void) { WSACleanup(); } static int -NTinit() +NTinit(void) { WSADATA WSAData; int ret; @@ -2225,13 +2223,13 @@ /* Additional initialization and cleanup for OS/2 */ static void -OS2cleanup() +OS2cleanup(void) { /* No cleanup is necessary for OS/2 Sockets */ } static int -OS2init() +OS2init(void) { char reason[64]; int rc = sock_init();
