Date: Thu, 26 Feb 2009 20:32:12 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r189087 - head/lib/librpcsvc Message-ID: <200902262032.n1QKWCQt037519@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <pawel worach gmail com> 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 <rpcsvc/rnusers.h> 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 <rpcsvc/rstat.h> 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 <rpcsvc/rwall.h> 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');
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902262032.n1QKWCQt037519>