Replace K&R function declarations with ANSI declarations (#114818)

This commit is contained in:
Max Bachmann 2025-03-11 13:06:36 +01:00 committed by GitHub
parent 6e5b9f3d00
commit 44c55c2356
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 25 deletions

View file

@ -488,13 +488,8 @@ getaddrinfo(const char*hostname, const char*servname,
} }
static int static int
get_name(addr, gai_afd, res, numaddr, pai, port0) get_name(const char *addr, struct gai_afd *gai_afd, struct addrinfo **res,
const char *addr; char *numaddr, struct addrinfo *pai, int port0)
struct gai_afd *gai_afd;
struct addrinfo **res;
char *numaddr;
struct addrinfo *pai;
int port0;
{ {
u_short port = port0 & 0xffff; u_short port = port0 & 0xffff;
struct hostent *hp; struct hostent *hp;
@ -534,12 +529,8 @@ get_name(addr, gai_afd, res, numaddr, pai, port0)
} }
static int static int
get_addr(hostname, af, res, pai, port0) get_addr(const char *hostname, int af, struct addrinfo **res,
const char *hostname; struct addrinfo *pai, int port0)
int af;
struct addrinfo **res;
struct addrinfo *pai;
int port0;
{ {
u_short port = port0 & 0xffff; u_short port = port0 & 0xffff;
struct addrinfo sentinel; struct addrinfo sentinel;

View file

@ -84,19 +84,9 @@ struct gni_sockinet {
#define ENI_FAMILY 5 #define ENI_FAMILY 5
#define ENI_SALEN 6 #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 int
getnameinfo(sa, salen, host, hostlen, serv, servlen, flags) getnameinfo(const struct sockaddr *sa, size_t salen, char *host, size_t hostlen,
const struct sockaddr *sa; char *serv, size_t servlen, int flags)
size_t salen;
char *host;
size_t hostlen;
char *serv;
size_t servlen;
int flags;
{ {
struct gni_afd *gni_afd; struct gni_afd *gni_afd;
struct servent *sp; struct servent *sp;