Skip to content

replace k&r function declarations with ANSI declarations #114818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions Modules/getaddrinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,8 @@ getaddrinfo(const char*hostname, const char*servname,
}

static int
get_name(addr, gai_afd, res, numaddr, pai, port0)
const char *addr;
struct gai_afd *gai_afd;
struct addrinfo **res;
char *numaddr;
struct addrinfo *pai;
int port0;
get_name(const char *addr, struct gai_afd *gai_afd, struct addrinfo **res,
char *numaddr, struct addrinfo *pai, int port0)
{
u_short port = port0 & 0xffff;
struct hostent *hp;
Expand Down Expand Up @@ -534,12 +529,8 @@ get_name(addr, gai_afd, res, numaddr, pai, port0)
}

static int
get_addr(hostname, af, res, pai, port0)
const char *hostname;
int af;
struct addrinfo **res;
struct addrinfo *pai;
int port0;
get_addr(const char *hostname, int af, struct addrinfo **res,
struct addrinfo *pai, int port0)
{
u_short port = port0 & 0xffff;
struct addrinfo sentinel;
Expand Down
14 changes: 2 additions & 12 deletions Modules/getnameinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,9 @@ struct gni_sockinet {
#define ENI_FAMILY 5
#define ENI_SALEN 6

/* forward declaration to make gcc happy */
int getnameinfo(const struct sockaddr *, size_t, char *, size_t,
char *, size_t, int);

int
getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
const struct sockaddr *sa;
size_t salen;
char *host;
size_t hostlen;
char *serv;
size_t servlen;
int flags;
getnameinfo(const struct sockaddr *sa, size_t salen, char *host, size_t hostlen,
char *serv, size_t servlen, int flags)
{
struct gni_afd *gni_afd;
struct servent *sp;
Expand Down
Loading