From owner-svn-src-head@FreeBSD.ORG Thu Feb 26 20:32:12 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FAA7106566B; Thu, 26 Feb 2009 20:32:12 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DD958FC13; Thu, 26 Feb 2009 20:32:12 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1QKWCQI037524; Thu, 26 Feb 2009 20:32:12 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1QKWCQt037519; Thu, 26 Feb 2009 20:32:12 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200902262032.n1QKWCQt037519@svn.freebsd.org> From: Ed Schouten Date: Thu, 26 Feb 2009 20:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189087 - head/lib/librpcsvc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 26 Feb 2009 20:32:12 -0000 Author: ed Date: Thu Feb 26 20:32:11 2009 New Revision: 189087 URL: http://svn.freebsd.org/changeset/base/189087 Log: Use ANSI function declarations in librpcsvc. When compiling librpcsvc with LLVM, we get a compiler error, because hexval() uses an ANSI prototype, but a K&R declaration. I could have just changed hexval(), but I'd rather keep this consistent. It's not that much code. Submitted by: Pawel Worach Modified: head/lib/librpcsvc/rnusers.c head/lib/librpcsvc/rstat.c head/lib/librpcsvc/rwall.c head/lib/librpcsvc/secretkey.c head/lib/librpcsvc/xcrypt.c Modified: head/lib/librpcsvc/rnusers.c ============================================================================== --- head/lib/librpcsvc/rnusers.c Thu Feb 26 20:00:14 2009 (r189086) +++ head/lib/librpcsvc/rnusers.c Thu Feb 26 20:32:11 2009 (r189087) @@ -47,9 +47,7 @@ static char sccsid[] = "@(#)rnusers.c 1. #include int -rusers(host, up) - char *host; - struct utmpidlearr *up; +rusers(char *host, utmpidlearr *up) { return (callrpc(host, RUSERSPROG, RUSERSVERS_IDLE, RUSERSPROC_NAMES, (xdrproc_t)xdr_void, (char *) NULL, @@ -57,8 +55,7 @@ rusers(host, up) } int -rnusers(host) - char *host; +rnusers(char *host) { int nusers; Modified: head/lib/librpcsvc/rstat.c ============================================================================== --- head/lib/librpcsvc/rstat.c Thu Feb 26 20:00:14 2009 (r189086) +++ head/lib/librpcsvc/rstat.c Thu Feb 26 20:32:11 2009 (r189087) @@ -46,9 +46,7 @@ static char sccsid[] = "@(#)rstat.c 1.2 #include enum clnt_stat -rstat(host, statp) - char *host; - struct statstime *statp; +rstat(char *host, struct statstime *statp) { return (callrpc(host, RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS, (xdrproc_t)xdr_void, (char *) NULL, @@ -56,8 +54,7 @@ rstat(host, statp) } int -havedisk(host) - char *host; +havedisk(char *host) { long have; Modified: head/lib/librpcsvc/rwall.c ============================================================================== --- head/lib/librpcsvc/rwall.c Thu Feb 26 20:00:14 2009 (r189086) +++ head/lib/librpcsvc/rwall.c Thu Feb 26 20:32:11 2009 (r189087) @@ -46,9 +46,7 @@ static char sccsid[] = "@(#)rwall.c 1.2 #include int -rwall(host, msg) - char *host; - char *msg; +rwall(char *host, char *msg) { return (callrpc(host, WALLPROG, WALLVERS, WALLPROC_WALL, (xdrproc_t)xdr_wrapstring, (char *) &msg, Modified: head/lib/librpcsvc/secretkey.c ============================================================================== --- head/lib/librpcsvc/secretkey.c Thu Feb 26 20:00:14 2009 (r189086) +++ head/lib/librpcsvc/secretkey.c Thu Feb 26 20:32:11 2009 (r189087) @@ -58,10 +58,7 @@ extern int xdecrypt( char *, char * ); * passwd to decrypt it. */ int -getsecretkey(netname, secretkey, passwd) - char *netname; - char *secretkey; - char *passwd; +getsecretkey(char *netname, char *secretkey, char *passwd) { char lookup[3 * HEXKEYBYTES]; char *p; Modified: head/lib/librpcsvc/xcrypt.c ============================================================================== --- head/lib/librpcsvc/xcrypt.c Thu Feb 26 20:00:14 2009 (r189086) +++ head/lib/librpcsvc/xcrypt.c Thu Feb 26 20:32:11 2009 (r189087) @@ -56,9 +56,7 @@ void passwd2des( char *, char * ); * Its length must be a multiple of 16 hex digits (64 bits). */ int -xencrypt(secret, passwd) - char *secret; - char *passwd; +xencrypt(char *secret, char *passwd) { char key[8]; char ivec[8]; @@ -91,9 +89,7 @@ xencrypt(secret, passwd) * Once again, the length is a multiple of 16 hex digits */ int -xdecrypt(secret, passwd) - char *secret; - char *passwd; +xdecrypt(char *secret, char *passwd) { char key[8]; char ivec[8]; @@ -125,9 +121,7 @@ xdecrypt(secret, passwd) * Turn password into DES key */ void -passwd2des(pw, key) - char *pw; - char *key; +passwd2des(char *pw, char *key) { int i; @@ -144,10 +138,7 @@ passwd2des(pw, key) * Hex to binary conversion */ static void -hex2bin(len, hexnum, binnum) - int len; - char *hexnum; - char *binnum; +hex2bin(int len, char *hexnum, char *binnum) { int i; @@ -160,10 +151,7 @@ hex2bin(len, hexnum, binnum) * Binary to hex conversion */ static void -bin2hex(len, binnum, hexnum) - int len; - unsigned char *binnum; - char *hexnum; +bin2hex(int len, unsigned char *binnum, char *hexnum) { int i; unsigned val; @@ -177,8 +165,7 @@ bin2hex(len, binnum, hexnum) } static char -hexval(c) - char c; +hexval(char c) { if (c >= '0' && c <= '9') { return (c - '0');