Code cleanup (part one):

1. Added missing function prototypes.

2. Added missing function return types.

3. Added missing function argument types.

4. Added missing headers for system function prototypes.

5. Got rid of "extern int errno" rubbish.
This commit is contained in:
jraynard 1996-06-08 22:54:59 +00:00
parent 6f17f90cd6
commit 334d5a2501
8 changed files with 28 additions and 14 deletions

View File

@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)auth_none.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: auth_none.c,v 1.2 1995/05/30 05:41:11 rgrimes Exp $";
static char *rcsid = "$Id: auth_none.c,v 1.3 1995/10/22 14:51:06 phk Exp $";
#endif
/*
@ -47,6 +47,8 @@ static char *rcsid = "$Id: auth_none.c,v 1.2 1995/05/30 05:41:11 rgrimes Exp $";
#include <rpc/auth.h>
#define MAX_MARSHEL_SIZE 20
bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
/*
* Authenticator operations routines
*/

View File

@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)clnt_raw.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: clnt_raw.c,v 1.3 1995/10/22 14:51:16 phk Exp $";
static char *rcsid = "$Id: clnt_raw.c,v 1.4 1995/10/27 16:56:48 adam Exp $";
#endif
/*
@ -46,9 +46,12 @@ static char *rcsid = "$Id: clnt_raw.c,v 1.3 1995/10/22 14:51:16 phk Exp $";
#include <rpc/rpc.h>
#include <stdlib.h>
#include <stdio.h>
#define MCALL_MSG_SIZE 24
bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
/*
* This is the "network" we will be moving stuff over.
*/

View File

@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)get_myaddress.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: get_myaddress.c,v 1.2 1995/05/30 05:41:20 rgrimes Exp $";
static char *rcsid = "$Id: get_myaddress.c,v 1.3 1995/10/22 14:51:23 phk Exp $";
#endif
/*
@ -54,7 +54,7 @@ static char *rcsid = "$Id: get_myaddress.c,v 1.2 1995/05/30 05:41:20 rgrimes Exp
/*
* don't use gethostbyname, which would invoke yellow pages
*/
get_myaddress(addr)
void get_myaddress(addr)
struct sockaddr_in *addr;
{
int s;

View File

@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)getrpcport.c 1.3 87/08/11 SMI";*/
/*static char *sccsid = "from: @(#)getrpcport.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: getrpcport.c,v 1.2 1995/05/30 05:41:22 rgrimes Exp $";
static char *rcsid = "$Id: getrpcport.c,v 1.3 1995/10/22 14:51:26 phk Exp $";
#endif
/*
@ -43,8 +43,11 @@ static char *rcsid = "$Id: getrpcport.c,v 1.2 1995/05/30 05:41:22 rgrimes Exp $"
#include <netdb.h>
#include <sys/socket.h>
getrpcport(host, prognum, versnum, proto)
u_short pmap_getport(struct sockaddr_in *, u_long, u_long, u_int);
int getrpcport(host, prognum, versnum, proto)
char *host;
int prognum, versnum, proto;
{
struct sockaddr_in addr;
struct hostent *hp;

View File

@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)pmap_clnt.c 1.37 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)pmap_clnt.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: pmap_clnt.c,v 1.2 1995/05/30 05:41:22 rgrimes Exp $";
static char *rcsid = "$Id: pmap_clnt.c,v 1.3 1995/10/22 14:51:28 phk Exp $";
#endif
/*
@ -45,6 +45,8 @@ static char *rcsid = "$Id: pmap_clnt.c,v 1.2 1995/05/30 05:41:22 rgrimes Exp $";
#include <rpc/pmap_prot.h>
#include <rpc/pmap_clnt.h>
void get_myaddress(struct sockaddr_in *);
static struct timeval timeout = { 5, 0 };
static struct timeval tottimeout = { 60, 0 };

View File

@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)rpc_callmsg.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: rpc_callmsg.c,v 1.2 1995/05/30 05:41:28 rgrimes Exp $";
static char *rcsid = "$Id: rpc_callmsg.c,v 1.3 1995/10/22 14:51:33 phk Exp $";
#endif
/*
@ -45,6 +45,8 @@ static char *rcsid = "$Id: rpc_callmsg.c,v 1.2 1995/05/30 05:41:28 rgrimes Exp $
#include <string.h>
#include <rpc/rpc.h>
bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
/*
* XDR a call message
*/

View File

@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)svc_tcp.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: svc_tcp.c,v 1.3 1995/10/22 14:51:38 phk Exp $";
static char *rcsid = "$Id: svc_tcp.c,v 1.4 1995/12/07 12:50:56 bde Exp $";
#endif
/*
@ -51,6 +51,9 @@ static char *rcsid = "$Id: svc_tcp.c,v 1.3 1995/10/22 14:51:38 phk Exp $";
#include <sys/socket.h>
#include <errno.h>
int bindresvport(int sd, struct sockaddr_in *);
int _rpc_dtablesize(void);
/*
* Ops vector for TCP/IP based rpc service handle
*/

View File

@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)svc_udp.c 2.2 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: svc_udp.c,v 1.3 1995/05/30 05:41:39 rgrimes Exp $";
static char *rcsid = "$Id: svc_udp.c,v 1.4 1995/10/22 14:51:39 phk Exp $";
#endif
/*
@ -49,6 +49,7 @@ static char *rcsid = "$Id: svc_udp.c,v 1.3 1995/05/30 05:41:39 rgrimes Exp $";
#include <sys/socket.h>
#include <errno.h>
int bindresvport(int sd, struct sockaddr_in *);
#define rpc_buffer(xprt) ((xprt)->xp_p1)
#define MAX(a, b) ((a > b) ? a : b)
@ -69,8 +70,6 @@ static struct xp_ops svcudp_op = {
svcudp_destroy
};
extern int errno;
/*
* kept in xprt->xp_p2
*/
@ -340,7 +339,7 @@ struct udp_cache {
* Enable use of the cache.
* Note: there is no disable.
*/
svcudp_enablecache(transp, size)
int svcudp_enablecache(transp, size)
SVCXPRT *transp;
u_long size;
{
@ -444,7 +443,7 @@ cache_set(xprt, replylen)
* return 1 if found, 0 if not found
*/
static
cache_get(xprt, msg, replyp, replylenp)
int cache_get(xprt, msg, replyp, replylenp)
SVCXPRT *xprt;
struct rpc_msg *msg;
char **replyp;