From owner-svn-src-head@freebsd.org Tue Sep 22 15:57:28 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FFA5A05B89; Tue, 22 Sep 2015 15:57:28 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 889611986; Tue, 22 Sep 2015 15:57:28 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8MFvSTj010269; Tue, 22 Sep 2015 15:57:28 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8MFvRUH010265; Tue, 22 Sep 2015 15:57:27 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201509221557.t8MFvRUH010265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 22 Sep 2015 15:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288114 - head/lib/libc/resolv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 15:57:28 -0000 Author: rodrigc Date: Tue Sep 22 15:57:26 2015 New Revision: 288114 URL: https://svnweb.freebsd.org/changeset/base/288114 Log: Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. Modified: head/lib/libc/resolv/res_debug.c head/lib/libc/resolv/res_init.c head/lib/libc/resolv/res_mkupdate.c head/lib/libc/resolv/res_send.c Modified: head/lib/libc/resolv/res_debug.c ============================================================================== --- head/lib/libc/resolv/res_debug.c Tue Sep 22 15:40:07 2015 (r288113) +++ head/lib/libc/resolv/res_debug.c Tue Sep 22 15:57:26 2015 (r288114) @@ -367,11 +367,8 @@ p_cdname(const u_char *cp, const u_char 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, /*% 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 * 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 Modified: head/lib/libc/resolv/res_init.c ============================================================================== --- head/lib/libc/resolv/res_init.c Tue Sep 22 15:40:07 2015 (r288113) +++ head/lib/libc/resolv/res_init.c Tue Sep 22 15:57:26 2015 (r288114) @@ -718,8 +718,7 @@ res_setoptions(res_state statp, const ch #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); Modified: head/lib/libc/resolv/res_mkupdate.c ============================================================================== --- head/lib/libc/resolv/res_mkupdate.c Tue Sep 22 15:40:07 2015 (r288113) +++ head/lib/libc/resolv/res_mkupdate.c Tue Sep 22 15:57:26 2015 (r288114) @@ -973,7 +973,7 @@ struct valuelist { static struct valuelist *servicelist, *protolist; static void -res_buildservicelist() { +res_buildservicelist(void) { struct servent *sp; struct valuelist *slp; Modified: head/lib/libc/resolv/res_send.c ============================================================================== --- head/lib/libc/resolv/res_send.c Tue Sep 22 15:40:07 2015 (r288113) +++ head/lib/libc/resolv/res_send.c Tue Sep 22 15:57:26 2015 (r288114) @@ -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) {