From owner-svn-src-head@freebsd.org Sun Sep 20 21:21:05 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 001B4A0625A; Sun, 20 Sep 2015 21:21:04 +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 E22F21294; Sun, 20 Sep 2015 21:21:04 +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 t8KLL4iR011710; Sun, 20 Sep 2015 21:21:04 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8KLL24u011698; Sun, 20 Sep 2015 21:21:02 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201509202121.t8KLL24u011698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sun, 20 Sep 2015 21:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288045 - head/lib/libc/net 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: Sun, 20 Sep 2015 21:21:05 -0000 Author: rodrigc Date: Sun Sep 20 21:21:01 2015 New Revision: 288045 URL: https://svnweb.freebsd.org/changeset/base/288045 Log: Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. Modified: head/lib/libc/net/gethostbydns.c head/lib/libc/net/getnetbydns.c head/lib/libc/net/getservent.c head/lib/libc/net/linkaddr.c head/lib/libc/net/nslexer.l head/lib/libc/net/nsparser.y head/lib/libc/net/recv.c head/lib/libc/net/rthdr.c head/lib/libc/net/send.c Modified: head/lib/libc/net/gethostbydns.c ============================================================================== --- head/lib/libc/net/gethostbydns.c Sun Sep 20 21:18:33 2015 (r288044) +++ head/lib/libc/net/gethostbydns.c Sun Sep 20 21:21:01 2015 (r288045) @@ -107,10 +107,7 @@ int _dns_ttl_; #ifdef DEBUG static void -dprintf(msg, num, res) - char *msg; - int num; - res_state res; +dprintf(char *msg, int num, res_state res) { if (res->options & RES_DEBUG) { int save = errno; @@ -769,7 +766,7 @@ _sethostdnsent(int stayopen) } void -_endhostdnsent() +_endhostdnsent(void) { res_state statp; Modified: head/lib/libc/net/getnetbydns.c ============================================================================== --- head/lib/libc/net/getnetbydns.c Sun Sep 20 21:18:33 2015 (r288044) +++ head/lib/libc/net/getnetbydns.c Sun Sep 20 21:21:01 2015 (r288045) @@ -455,7 +455,7 @@ _setnetdnsent(int stayopen) } void -_endnetdnsent() +_endnetdnsent(void) { res_state statp; Modified: head/lib/libc/net/getservent.c ============================================================================== --- head/lib/libc/net/getservent.c Sun Sep 20 21:18:33 2015 (r288044) +++ head/lib/libc/net/getservent.c Sun Sep 20 21:21:01 2015 (r288045) @@ -1241,7 +1241,7 @@ setservent(int stayopen) } void -endservent() +endservent(void) { #ifdef NS_CACHING static const nss_cache_info cache_info = NS_MP_CACHE_INFO_INITIALIZER( @@ -1362,7 +1362,7 @@ getservbyport(int port, const char *prot } struct servent * -getservent() +getservent(void) { struct key key; Modified: head/lib/libc/net/linkaddr.c ============================================================================== --- head/lib/libc/net/linkaddr.c Sun Sep 20 21:18:33 2015 (r288044) +++ head/lib/libc/net/linkaddr.c Sun Sep 20 21:21:01 2015 (r288045) @@ -50,9 +50,7 @@ __FBSDID("$FreeBSD$"); #define LETTER (4*3) void -link_addr(addr, sdl) - const char *addr; - struct sockaddr_dl *sdl; +link_addr(const char *addr, struct sockaddr_dl *sdl) { char *cp = sdl->sdl_data; char *cplim = sdl->sdl_len + (char *)sdl; @@ -121,8 +119,7 @@ link_addr(addr, sdl) static const char hexlist[] = "0123456789abcdef"; char * -link_ntoa(sdl) - const struct sockaddr_dl *sdl; +link_ntoa(const struct sockaddr_dl *sdl) { static char obuf[64]; char *out = obuf; Modified: head/lib/libc/net/nslexer.l ============================================================================== --- head/lib/libc/net/nslexer.l Sun Sep 20 21:18:33 2015 (r288044) +++ head/lib/libc/net/nslexer.l Sun Sep 20 21:21:01 2015 (r288045) @@ -97,14 +97,13 @@ STRING [a-zA-Z][a-zA-Z0-9_]* #undef _nsyywrap int -_nsyywrap() +_nsyywrap(void) { return 1; } /* _nsyywrap */ void -_nsyyerror(msg) - const char *msg; +_nsyyerror(const char *msg) { syslog(LOG_ERR, "NSSWITCH(nslexer): %s line %d: %s at '%s'", Modified: head/lib/libc/net/nsparser.y ============================================================================== --- head/lib/libc/net/nsparser.y Sun Sep 20 21:18:33 2015 (r288044) +++ head/lib/libc/net/nsparser.y Sun Sep 20 21:21:01 2015 (r288045) @@ -145,8 +145,7 @@ Action %% static void -_nsaddsrctomap(elem) - const char *elem; +_nsaddsrctomap(const char *elem) { int i, lineno; extern int _nsyylineno; Modified: head/lib/libc/net/recv.c ============================================================================== --- head/lib/libc/net/recv.c Sun Sep 20 21:18:33 2015 (r288044) +++ head/lib/libc/net/recv.c Sun Sep 20 21:21:01 2015 (r288045) @@ -40,10 +40,7 @@ __FBSDID("$FreeBSD$"); #include ssize_t -recv(s, buf, len, flags) - int s, flags; - size_t len; - void *buf; +recv(int s, void *buf, size_t len, int flags) { /* * POSIX says recv() shall be a cancellation point, so call the Modified: head/lib/libc/net/rthdr.c ============================================================================== --- head/lib/libc/net/rthdr.c Sun Sep 20 21:18:33 2015 (r288044) +++ head/lib/libc/net/rthdr.c Sun Sep 20 21:21:01 2015 (r288045) @@ -47,8 +47,7 @@ __FBSDID("$FreeBSD$"); */ size_t -inet6_rthdr_space(type, seg) - int type, seg; +inet6_rthdr_space(int type, int seg) { switch (type) { case IPV6_RTHDR_TYPE_0: @@ -67,9 +66,7 @@ inet6_rthdr_space(type, seg) } struct cmsghdr * -inet6_rthdr_init(bp, type) - void *bp; - int type; +inet6_rthdr_init(void *bp, int type) { struct cmsghdr *ch = (struct cmsghdr *)bp; struct ip6_rthdr *rthdr; @@ -98,10 +95,7 @@ inet6_rthdr_init(bp, type) /* ARGSUSED */ int -inet6_rthdr_add(cmsg, addr, flags) - struct cmsghdr *cmsg; - const struct in6_addr *addr; - u_int flags; +inet6_rthdr_add(struct cmsghdr *cmsg, const struct in6_addr *addr, u_int flags) { struct ip6_rthdr *rthdr; @@ -143,9 +137,7 @@ inet6_rthdr_add(cmsg, addr, flags) /* ARGSUSED */ int -inet6_rthdr_lasthop(cmsg, flags) - struct cmsghdr *cmsg; - unsigned int flags; +inet6_rthdr_lasthop(struct cmsghdr *cmsg, unsigned int flags) { struct ip6_rthdr *rthdr; @@ -183,9 +175,7 @@ inet6_rthdr_lasthop(cmsg, flags) #if 0 int -inet6_rthdr_reverse(in, out) - const struct cmsghdr *in; - struct cmsghdr *out; +inet6_rthdr_reverse(const struct cmsghdr *in, struct cmsghdr *out) { return (-1); @@ -193,8 +183,7 @@ inet6_rthdr_reverse(in, out) #endif int -inet6_rthdr_segments(cmsg) - const struct cmsghdr *cmsg; +inet6_rthdr_segments(const struct cmsghdr *cmsg) { struct ip6_rthdr *rthdr; @@ -217,9 +206,7 @@ inet6_rthdr_segments(cmsg) } struct in6_addr * -inet6_rthdr_getaddr(cmsg, idx) - struct cmsghdr *cmsg; - int idx; +inet6_rthdr_getaddr(struct cmsghdr *cmsg, int idx) { struct ip6_rthdr *rthdr; @@ -249,9 +236,7 @@ inet6_rthdr_getaddr(cmsg, idx) } int -inet6_rthdr_getflags(cmsg, idx) - const struct cmsghdr *cmsg; - int idx; +inet6_rthdr_getflags(const struct cmsghdr *cmsg, int idx) { struct ip6_rthdr *rthdr; Modified: head/lib/libc/net/send.c ============================================================================== --- head/lib/libc/net/send.c Sun Sep 20 21:18:33 2015 (r288044) +++ head/lib/libc/net/send.c Sun Sep 20 21:21:01 2015 (r288045) @@ -40,10 +40,7 @@ __FBSDID("$FreeBSD$"); #include ssize_t -send(s, msg, len, flags) - int s, flags; - size_t len; - const void *msg; +send(int s, const void *msg, size_t len, int flags) { /* * POSIX says send() shall be a cancellation point, so call the