summaryrefslogtreecommitdiffstats
path: root/lib/librpcsvc
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-02-26 20:32:11 +0000
committered <ed@FreeBSD.org>2009-02-26 20:32:11 +0000
commitffab68620f121460586af38654ee5be9efaa11f3 (patch)
tree2b79d2949beb316192954f2c483d67d0b2383b8a /lib/librpcsvc
parentab39654e319d3fec6d8c5e3907ffc143827025b6 (diff)
downloadFreeBSD-src-ffab68620f121460586af38654ee5be9efaa11f3.zip
FreeBSD-src-ffab68620f121460586af38654ee5be9efaa11f3.tar.gz
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>
Diffstat (limited to 'lib/librpcsvc')
-rw-r--r--lib/librpcsvc/rnusers.c7
-rw-r--r--lib/librpcsvc/rstat.c7
-rw-r--r--lib/librpcsvc/rwall.c4
-rw-r--r--lib/librpcsvc/secretkey.c5
-rw-r--r--lib/librpcsvc/xcrypt.c25
5 files changed, 12 insertions, 36 deletions
diff --git a/lib/librpcsvc/rnusers.c b/lib/librpcsvc/rnusers.c
index 49cab07..2a68de5 100644
--- a/lib/librpcsvc/rnusers.c
+++ b/lib/librpcsvc/rnusers.c
@@ -47,9 +47,7 @@ static char sccsid[] = "@(#)rnusers.c 1.2 91/03/11 TIRPC 1.0; from 1.7 89/03/24
#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;
diff --git a/lib/librpcsvc/rstat.c b/lib/librpcsvc/rstat.c
index 1c19c4e..c5cbe80 100644
--- a/lib/librpcsvc/rstat.c
+++ b/lib/librpcsvc/rstat.c
@@ -46,9 +46,7 @@ static char sccsid[] = "@(#)rstat.c 1.2 91/03/11 TIRPC 1.0; from 1.6 89/03/24 SM
#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;
diff --git a/lib/librpcsvc/rwall.c b/lib/librpcsvc/rwall.c
index dd7b590..d53f264 100644
--- a/lib/librpcsvc/rwall.c
+++ b/lib/librpcsvc/rwall.c
@@ -46,9 +46,7 @@ static char sccsid[] = "@(#)rwall.c 1.2 91/03/11 TIRPC 1.0; from 1.3 89/03/24 S
#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,
diff --git a/lib/librpcsvc/secretkey.c b/lib/librpcsvc/secretkey.c
index f455445..636fd89 100644
--- a/lib/librpcsvc/secretkey.c
+++ b/lib/librpcsvc/secretkey.c
@@ -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;
diff --git a/lib/librpcsvc/xcrypt.c b/lib/librpcsvc/xcrypt.c
index 7a310d3..17eec49 100644
--- a/lib/librpcsvc/xcrypt.c
+++ b/lib/librpcsvc/xcrypt.c
@@ -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');
OpenPOWER on IntegriCloud