diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2015-09-22 15:57:26 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2015-09-22 15:57:26 +0000 |
commit | aa2db6bfb4d7dd63bb4241cd9ec63ff8ee0f4421 (patch) | |
tree | cd1137a5808dcd5c0f46dd2bbb9626e0467de079 /lib/libc | |
parent | 5200f4be667a336fb2b90bdad8b6dab5d0979aa6 (diff) | |
download | FreeBSD-src-aa2db6bfb4d7dd63bb4241cd9ec63ff8ee0f4421.zip FreeBSD-src-aa2db6bfb4d7dd63bb4241cd9ec63ff8ee0f4421.tar.gz |
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/resolv/res_debug.c | 18 | ||||
-rw-r--r-- | lib/libc/resolv/res_init.c | 3 | ||||
-rw-r--r-- | lib/libc/resolv/res_mkupdate.c | 2 | ||||
-rw-r--r-- | lib/libc/resolv/res_send.c | 7 |
4 files changed, 9 insertions, 21 deletions
diff --git a/lib/libc/resolv/res_debug.c b/lib/libc/resolv/res_debug.c index 8ab0263..3764601 100644 --- a/lib/libc/resolv/res_debug.c +++ b/lib/libc/resolv/res_debug.c @@ -367,11 +367,8 @@ p_cdname(const u_char *cp, const u_char *msg, FILE *file) { length supplied). */ const u_char * -p_fqnname(cp, msg, msglen, name, namelen) - const u_char *cp, *msg; - int msglen; - char *name; - int namelen; +p_fqnname(const u_char *cp, const u_char *msg, int msglen, char *name, + int namelen) { int n, newlen; @@ -758,8 +755,7 @@ static unsigned int poweroften[10] = {1, 10, 100, 1000, 10000, 100000, /*% takes an XeY precision/size value, returns a string representation. */ static const char * -precsize_ntoa(prec) - u_int8_t prec; +precsize_ntoa(u_int8_t prec) { char *retbuf = precsize_ntoa_retbuf; unsigned long val; @@ -912,9 +908,7 @@ latlon2ul(const char **latlonstrptr, int *which) { * converts a zone file representation in a string to an RDATA on-the-wire * representation. */ int -loc_aton(ascii, binary) - const char *ascii; - u_char *binary; +loc_aton(const char *ascii, u_char *binary) { const char *cp, *maxcp; u_char *bcp; @@ -1023,9 +1017,7 @@ loc_aton(ascii, binary) /*% takes an on-the-wire LOC RR and formats it in a human readable format. */ const char * -loc_ntoa(binary, ascii) - const u_char *binary; - char *ascii; +loc_ntoa(const u_char *binary, char *ascii) { static const char *error = "?"; static char tmpbuf[sizeof diff --git a/lib/libc/resolv/res_init.c b/lib/libc/resolv/res_init.c index b5444ef..4dbd6d1 100644 --- a/lib/libc/resolv/res_init.c +++ b/lib/libc/resolv/res_init.c @@ -718,8 +718,7 @@ res_setoptions(res_state statp, const char *options, const char *source) #ifdef RESOLVSORT /* XXX - should really support CIDR which means explicit masks always. */ static u_int32_t -net_mask(in) /*!< XXX - should really use system's version of this */ - struct in_addr in; +net_mask(struct in_addr in) /*!< XXX - should really use system's version of this */ { u_int32_t i = ntohl(in.s_addr); diff --git a/lib/libc/resolv/res_mkupdate.c b/lib/libc/resolv/res_mkupdate.c index 00bce4c..d4981a5 100644 --- a/lib/libc/resolv/res_mkupdate.c +++ b/lib/libc/resolv/res_mkupdate.c @@ -973,7 +973,7 @@ struct valuelist { static struct valuelist *servicelist, *protolist; static void -res_buildservicelist() { +res_buildservicelist(void) { struct servent *sp; struct valuelist *slp; diff --git a/lib/libc/resolv/res_send.c b/lib/libc/resolv/res_send.c index fd1cd06..5690491 100644 --- a/lib/libc/resolv/res_send.c +++ b/lib/libc/resolv/res_send.c @@ -574,8 +574,7 @@ res_nsend(res_state statp, /* Private */ static int -get_salen(sa) - const struct sockaddr *sa; +get_salen(const struct sockaddr *sa) { #ifdef HAVE_SA_LEN @@ -596,9 +595,7 @@ get_salen(sa) * pick appropriate nsaddr_list for use. see res_init() for initialization. */ static struct sockaddr * -get_nsaddr(statp, n) - res_state statp; - size_t n; +get_nsaddr(res_state statp, size_t n) { if (!statp->nsaddr_list[n].sin_family && EXT(statp).ext) { |