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>
This commit is contained in:
ed 2009-02-26 20:32:11 +00:00
parent ab39654e31
commit ffab68620f
5 changed files with 12 additions and 36 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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;

View File

@ -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');