summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/rpc/clnt.h4
-rw-r--r--include/rpc/svc.h4
-rw-r--r--lib/libc/rpc/auth_none.c26
-rw-r--r--lib/libc/rpc/auth_unix.c46
-rw-r--r--lib/libc/rpc/authunix_prot.c6
-rw-r--r--lib/libc/rpc/clnt_perror.c4
-rw-r--r--lib/libc/rpc/clnt_raw.c33
-rw-r--r--lib/libc/rpc/clnt_tcp.c49
-rw-r--r--lib/libc/rpc/clnt_udp.c51
-rw-r--r--lib/libc/rpc/getrpcent.c20
-rw-r--r--lib/libc/rpc/pmap_clnt.c9
-rw-r--r--lib/libc/rpc/pmap_getmaps.c4
-rw-r--r--lib/libc/rpc/pmap_getport.c4
-rw-r--r--lib/libc/rpc/pmap_prot2.c10
-rw-r--r--lib/libc/rpc/pmap_rmt.c20
-rw-r--r--lib/libc/rpc/rpc_callmsg.c10
-rw-r--r--lib/libc/rpc/rpc_prot.c38
-rw-r--r--lib/libc/rpc/svc.c34
-rw-r--r--lib/libc/rpc/svc_auth.c10
-rw-r--r--lib/libc/rpc/svc_auth_unix.c14
-rw-r--r--lib/libc/rpc/svc_raw.c18
-rw-r--r--lib/libc/rpc/svc_tcp.c46
-rw-r--r--lib/libc/rpc/svc_udp.c64
-rw-r--r--lib/libc/rpc/xdr.c42
-rw-r--r--lib/libc/rpc/xdr_array.c28
-rw-r--r--lib/libc/rpc/xdr_float.c14
-rw-r--r--lib/libc/rpc/xdr_mem.c62
-rw-r--r--lib/libc/rpc/xdr_rec.c123
-rw-r--r--lib/libc/rpc/xdr_reference.c10
-rw-r--r--lib/libc/rpc/xdr_stdio.c24
30 files changed, 411 insertions, 416 deletions
diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h
index a4d3185ff92..0c28612cb5a 100644
--- a/include/rpc/clnt.h
+++ b/include/rpc/clnt.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: clnt.h,v 1.4 1998/03/19 00:27:17 millert Exp $ */
+/* $OpenBSD: clnt.h,v 1.5 2001/09/15 13:51:00 deraadt Exp $ */
/* $NetBSD: clnt.h,v 1.6 1995/04/29 05:27:58 cgd Exp $ */
/*
@@ -280,7 +280,7 @@ __END_DECLS
* struct sockaddr_in *raddr;
* u_long prog;
* u_long version;
- * register int *sockp;
+ * int *sockp;
* u_int sendsz;
* u_int recvsz;
*/
diff --git a/include/rpc/svc.h b/include/rpc/svc.h
index 7fcdf91e0b3..0ade6063889 100644
--- a/include/rpc/svc.h
+++ b/include/rpc/svc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: svc.h,v 1.4 2001/03/03 06:50:27 deraadt Exp $ */
+/* $OpenBSD: svc.h,v 1.5 2001/09/15 13:51:00 deraadt Exp $ */
/* $NetBSD: svc.h,v 1.9 1995/04/29 05:28:01 cgd Exp $ */
/*
@@ -95,7 +95,7 @@ typedef struct __rpc_svcxprt {
/* destroy this struct */
void (*xp_destroy) __P((struct __rpc_svcxprt *));
} *xp_ops;
- int xp_addrlen; /* length of remote address */
+ socklen_t xp_addrlen; /* length of remote address */
struct sockaddr_in xp_raddr; /* remote address */
struct opaque_auth xp_verf; /* raw response verifier */
caddr_t xp_p1; /* private */
diff --git a/lib/libc/rpc/auth_none.c b/lib/libc/rpc/auth_none.c
index 0abbe099871..b7b4f75b163 100644
--- a/lib/libc/rpc/auth_none.c
+++ b/lib/libc/rpc/auth_none.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: auth_none.c,v 1.6 2001/03/03 06:50:27 deraadt Exp $";
+static char *rcsid = "$OpenBSD: auth_none.c,v 1.7 2001/09/15 13:51:00 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -49,11 +49,11 @@ static char *rcsid = "$OpenBSD: auth_none.c,v 1.6 2001/03/03 06:50:27 deraadt Ex
/*
* Authenticator operations routines
*/
-static void authnone_destroy();
-static void authnone_verf();
-static bool_t authnone_marshal();
-static bool_t authnone_refresh();
-static bool_t authnone_validate();
+static void authnone_destroy(struct __rpc_auth *);
+static void authnone_verf(struct __rpc_auth *);
+static bool_t authnone_validate(struct __rpc_auth *, struct opaque_auth *);
+static bool_t authnone_marshal(struct __rpc_auth *, XDR *);
+static bool_t authnone_refresh(struct __rpc_auth *);
static struct auth_ops ops = {
authnone_verf,
@@ -72,9 +72,9 @@ static struct authnone_private {
AUTH *
authnone_create()
{
- register struct authnone_private *ap = authnone_private;
+ struct authnone_private *ap = authnone_private;
XDR xdr_stream;
- register XDR *xdrs;
+ XDR *xdrs;
if (ap == NULL) {
ap = (struct authnone_private *)calloc(1, sizeof (*ap));
@@ -102,7 +102,7 @@ authnone_marshal(client, xdrs)
AUTH *client;
XDR *xdrs;
{
- register struct authnone_private *ap = authnone_private;
+ struct authnone_private *ap = authnone_private;
if (ap == NULL)
return (0);
@@ -111,25 +111,25 @@ authnone_marshal(client, xdrs)
}
static void
-authnone_verf()
+authnone_verf(struct __rpc_auth *none)
{
}
static bool_t
-authnone_validate()
+authnone_validate(struct __rpc_auth *none, struct opaque_auth *noauth)
{
return (TRUE);
}
static bool_t
-authnone_refresh()
+authnone_refresh(struct __rpc_auth *none)
{
return (FALSE);
}
static void
-authnone_destroy()
+authnone_destroy(struct __rpc_auth *none)
{
}
diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c
index 21620785ec9..b4f0c9448de 100644
--- a/lib/libc/rpc/auth_unix.c
+++ b/lib/libc/rpc/auth_unix.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: auth_unix.c,v 1.13 2001/03/03 06:50:28 deraadt Exp $";
+static char *rcsid = "$OpenBSD: auth_unix.c,v 1.14 2001/09/15 13:51:00 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -57,11 +57,11 @@ static char *rcsid = "$OpenBSD: auth_unix.c,v 1.13 2001/03/03 06:50:28 deraadt E
/*
* Unix authenticator operations vector
*/
-static void authunix_destroy();
-static void authunix_nextverf();
-static bool_t authunix_marshal();
-static bool_t authunix_refresh();
-static bool_t authunix_validate();
+static void authunix_nextverf(struct __rpc_auth *);
+static bool_t authunix_marshal(struct __rpc_auth *, XDR *);
+static bool_t authunix_validate(struct __rpc_auth *, struct opaque_auth *);
+static bool_t authunix_refresh(struct __rpc_auth *);
+static void authunix_destroy(struct __rpc_auth *);
static struct auth_ops auth_unix_ops = {
authunix_nextverf,
@@ -95,15 +95,15 @@ authunix_create(machname, uid, gid, len, aup_gids)
char *machname;
int uid;
int gid;
- register int len;
+ int len;
int *aup_gids;
{
struct authunix_parms aup;
char mymem[MAX_AUTH_BYTES];
struct timeval now;
XDR xdrs;
- register AUTH *auth;
- register struct audata *au;
+ AUTH *auth;
+ struct audata *au;
/*
* Allocate and set up auth handle
@@ -172,10 +172,10 @@ authunix_create(machname, uid, gid, len, aup_gids)
AUTH *
authunix_create_default()
{
- register int len, i;
+ int len, i;
char machname[MAX_MACHINE_NAME + 1];
- register uid_t uid;
- register gid_t gid;
+ uid_t uid;
+ gid_t gid;
gid_t gids[NGRPS];
int gids2[NGRPS];
@@ -207,17 +207,17 @@ authunix_marshal(auth, xdrs)
AUTH *auth;
XDR *xdrs;
{
- register struct audata *au = AUTH_PRIVATE(auth);
+ struct audata *au = AUTH_PRIVATE(auth);
return (XDR_PUTBYTES(xdrs, au->au_marshed, au->au_mpos));
}
static bool_t
authunix_validate(auth, verf)
- register AUTH *auth;
+ AUTH *auth;
struct opaque_auth *verf;
{
- register struct audata *au;
+ struct audata *au;
XDR xdrs;
if (verf->oa_flavor == AUTH_SHORT) {
@@ -244,13 +244,13 @@ authunix_validate(auth, verf)
static bool_t
authunix_refresh(auth)
- register AUTH *auth;
+ AUTH *auth;
{
- register struct audata *au = AUTH_PRIVATE(auth);
+ struct audata *au = AUTH_PRIVATE(auth);
struct authunix_parms aup;
struct timeval now;
XDR xdrs;
- register int stat;
+ int stat;
if (auth->ah_cred.oa_base == au->au_origcred.oa_base) {
/* there is no hope. Punt */
@@ -287,9 +287,9 @@ done:
static void
authunix_destroy(auth)
- register AUTH *auth;
+ AUTH *auth;
{
- register struct audata *au = AUTH_PRIVATE(auth);
+ struct audata *au = AUTH_PRIVATE(auth);
mem_free(au->au_origcred.oa_base, au->au_origcred.oa_length);
@@ -310,11 +310,11 @@ authunix_destroy(auth)
*/
static void
marshal_new_auth(auth)
- register AUTH *auth;
+ AUTH *auth;
{
XDR xdr_stream;
- register XDR *xdrs = &xdr_stream;
- register struct audata *au = AUTH_PRIVATE(auth);
+ XDR *xdrs = &xdr_stream;
+ struct audata *au = AUTH_PRIVATE(auth);
xdrmem_create(xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE);
if ((! xdr_opaque_auth(xdrs, &(auth->ah_cred))) ||
diff --git a/lib/libc/rpc/authunix_prot.c b/lib/libc/rpc/authunix_prot.c
index 676d4506712..5b7755ec1b1 100644
--- a/lib/libc/rpc/authunix_prot.c
+++ b/lib/libc/rpc/authunix_prot.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: authunix_prot.c,v 1.3 1996/08/19 08:31:22 tholo Exp $";
+static char *rcsid = "$OpenBSD: authunix_prot.c,v 1.4 2001/09/15 13:51:00 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -49,8 +49,8 @@ static char *rcsid = "$OpenBSD: authunix_prot.c,v 1.3 1996/08/19 08:31:22 tholo
*/
bool_t
xdr_authunix_parms(xdrs, p)
- register XDR *xdrs;
- register struct authunix_parms *p;
+ XDR *xdrs;
+ struct authunix_parms *p;
{
if (xdr_u_long(xdrs, &(p->aup_time))
diff --git a/lib/libc/rpc/clnt_perror.c b/lib/libc/rpc/clnt_perror.c
index 3515bfb386e..70b82973a78 100644
--- a/lib/libc/rpc/clnt_perror.c
+++ b/lib/libc/rpc/clnt_perror.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: clnt_perror.c,v 1.12 2001/08/18 22:37:21 deraadt Exp $";
+static char *rcsid = "$OpenBSD: clnt_perror.c,v 1.13 2001/09/15 13:51:00 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -45,7 +45,7 @@ static char *rcsid = "$OpenBSD: clnt_perror.c,v 1.12 2001/08/18 22:37:21 deraadt
#include <rpc/auth.h>
#include <rpc/clnt.h>
-static char *auth_errmsg();
+static char *auth_errmsg(enum auth_stat stat);
#define CLNT_PERROR_BUFLEN 256
static char *buf;
diff --git a/lib/libc/rpc/clnt_raw.c b/lib/libc/rpc/clnt_raw.c
index 217e3603784..713fcd841af 100644
--- a/lib/libc/rpc/clnt_raw.c
+++ b/lib/libc/rpc/clnt_raw.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: clnt_raw.c,v 1.9 2001/03/03 06:50:28 deraadt Exp $";
+static char *rcsid = "$OpenBSD: clnt_raw.c,v 1.10 2001/09/15 13:51:00 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -59,12 +59,13 @@ static struct clntraw_private {
u_int mcnt;
} *clntraw_private;
-static enum clnt_stat clntraw_call();
-static void clntraw_abort();
-static void clntraw_geterr();
-static bool_t clntraw_freeres();
-static bool_t clntraw_control();
-static void clntraw_destroy();
+static enum clnt_stat clntraw_call(CLIENT *, u_long, xdrproc_t, caddr_t,
+ xdrproc_t, caddr_t, struct timeval);
+static void clntraw_abort(CLIENT *);
+static void clntraw_geterr(CLIENT *, struct rpc_err *);
+static bool_t clntraw_freeres(CLIENT *, xdrproc_t, caddr_t);
+static bool_t clntraw_control(CLIENT *, u_int, void *);
+static void clntraw_destroy(CLIENT *);
static struct clnt_ops client_ops = {
clntraw_call,
@@ -85,7 +86,7 @@ clntraw_create(prog, vers)
u_long prog;
u_long vers;
{
- register struct clntraw_private *clp = clntraw_private;
+ struct clntraw_private *clp = clntraw_private;
struct rpc_msg call_msg;
XDR *xdrs = &clp->xdr_stream;
CLIENT *client = &clp->client_object;
@@ -134,8 +135,8 @@ clntraw_call(h, proc, xargs, argsp, xresults, resultsp, timeout)
caddr_t resultsp;
struct timeval timeout;
{
- register struct clntraw_private *clp = clntraw_private;
- register XDR *xdrs = &clp->xdr_stream;
+ struct clntraw_private *clp = clntraw_private;
+ XDR *xdrs = &clp->xdr_stream;
struct rpc_msg msg;
enum clnt_stat status;
struct rpc_err error;
@@ -206,7 +207,7 @@ call_again:
}
static void
-clntraw_geterr()
+clntraw_geterr(CLIENT *clnt, struct rpc_err *err)
{
}
@@ -217,8 +218,8 @@ clntraw_freeres(cl, xdr_res, res_ptr)
xdrproc_t xdr_res;
caddr_t res_ptr;
{
- register struct clntraw_private *clp = clntraw_private;
- register XDR *xdrs = &clp->xdr_stream;
+ struct clntraw_private *clp = clntraw_private;
+ XDR *xdrs = &clp->xdr_stream;
bool_t rval;
if (clp == NULL) {
@@ -230,17 +231,17 @@ clntraw_freeres(cl, xdr_res, res_ptr)
}
static void
-clntraw_abort()
+clntraw_abort(CLIENT *clnt)
{
}
static bool_t
-clntraw_control()
+clntraw_control(CLIENT *clnt, u_int i, void *v)
{
return (FALSE);
}
static void
-clntraw_destroy()
+clntraw_destroy(CLIENT *clnt)
{
}
diff --git a/lib/libc/rpc/clnt_tcp.c b/lib/libc/rpc/clnt_tcp.c
index 441b1b91978..bb2f5607d3a 100644
--- a/lib/libc/rpc/clnt_tcp.c
+++ b/lib/libc/rpc/clnt_tcp.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.17 2000/08/24 17:03:15 deraadt Exp $";
+static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.18 2001/09/15 13:51:00 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -65,12 +65,13 @@ static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.17 2000/08/24 17:03:15 deraadt Ex
static int readtcp();
static int writetcp();
-static enum clnt_stat clnttcp_call();
-static void clnttcp_abort();
-static void clnttcp_geterr();
-static bool_t clnttcp_freeres();
-static bool_t clnttcp_control();
-static void clnttcp_destroy();
+static enum clnt_stat clnttcp_call(CLIENT *, u_long, xdrproc_t, caddr_t,
+ xdrproc_t, caddr_t, struct timeval);
+static void clnttcp_abort(CLIENT *);
+static void clnttcp_geterr(CLIENT *, struct rpc_err *);
+static bool_t clnttcp_freeres(CLIENT *, xdrproc_t, caddr_t);
+static bool_t clnttcp_control(CLIENT *, u_int, void *);
+static void clnttcp_destroy(CLIENT *);
static struct clnt_ops tcp_ops = {
clnttcp_call,
@@ -112,12 +113,12 @@ clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
struct sockaddr_in *raddr;
u_long prog;
u_long vers;
- register int *sockp;
+ int *sockp;
u_int sendsz;
u_int recvsz;
{
CLIENT *h;
- register struct ct_data *ct = NULL;
+ struct ct_data *ct = NULL;
struct timeval now;
struct rpc_msg call_msg;
@@ -225,7 +226,7 @@ fooy:
static enum clnt_stat
clnttcp_call(h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
- register CLIENT *h;
+ CLIENT *h;
u_long proc;
xdrproc_t xdr_args;
caddr_t args_ptr;
@@ -233,12 +234,12 @@ clnttcp_call(h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
caddr_t results_ptr;
struct timeval timeout;
{
- register struct ct_data *ct = (struct ct_data *) h->cl_private;
- register XDR *xdrs = &(ct->ct_xdrs);
+ struct ct_data *ct = (struct ct_data *) h->cl_private;
+ XDR *xdrs = &(ct->ct_xdrs);
struct rpc_msg reply_msg;
u_long x_id;
u_int32_t *msg_x_id = (u_int32_t *)(ct->ct_mcall); /* yuk */
- register bool_t shipnow;
+ bool_t shipnow;
int refreshes = 2;
if (!ct->ct_waitset) {
@@ -325,7 +326,7 @@ clnttcp_geterr(h, errp)
CLIENT *h;
struct rpc_err *errp;
{
- register struct ct_data *ct =
+ struct ct_data *ct =
(struct ct_data *) h->cl_private;
*errp = ct->ct_error;
@@ -337,25 +338,25 @@ clnttcp_freeres(cl, xdr_res, res_ptr)
xdrproc_t xdr_res;
caddr_t res_ptr;
{
- register struct ct_data *ct = (struct ct_data *)cl->cl_private;
- register XDR *xdrs = &(ct->ct_xdrs);
+ struct ct_data *ct = (struct ct_data *)cl->cl_private;
+ XDR *xdrs = &(ct->ct_xdrs);
xdrs->x_op = XDR_FREE;
return ((*xdr_res)(xdrs, res_ptr));
}
static void
-clnttcp_abort()
+clnttcp_abort(CLIENT *clnt)
{
}
static bool_t
clnttcp_control(cl, request, info)
CLIENT *cl;
- int request;
- char *info;
+ u_int request;
+ void *info;
{
- register struct ct_data *ct = (struct ct_data *)cl->cl_private;
+ struct ct_data *ct = (struct ct_data *)cl->cl_private;
switch (request) {
case CLSET_TIMEOUT:
@@ -379,7 +380,7 @@ static void
clnttcp_destroy(h)
CLIENT *h;
{
- register struct ct_data *ct =
+ struct ct_data *ct =
(struct ct_data *) h->cl_private;
if (ct->ct_closeit) {
@@ -397,9 +398,9 @@ clnttcp_destroy(h)
*/
static int
readtcp(ct, buf, len)
- register struct ct_data *ct;
+ struct ct_data *ct;
caddr_t buf;
- register int len;
+ int len;
{
fd_set *fds, readfds;
struct timeval start, after, duration, delta, tmp;
@@ -475,7 +476,7 @@ writetcp(ct, buf, len)
caddr_t buf;
int len;
{
- register int i, cnt;
+ int i, cnt;
for (cnt = len; cnt > 0; cnt -= i, buf += i) {
if ((i = write(ct->ct_sock, buf, cnt)) == -1) {
diff --git a/lib/libc/rpc/clnt_udp.c b/lib/libc/rpc/clnt_udp.c
index 6e8120bdb8d..3ee71861e09 100644
--- a/lib/libc/rpc/clnt_udp.c
+++ b/lib/libc/rpc/clnt_udp.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: clnt_udp.c,v 1.16 2000/08/24 17:03:15 deraadt Exp $";
+static char *rcsid = "$OpenBSD: clnt_udp.c,v 1.17 2001/09/15 13:51:00 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -51,12 +51,13 @@ static char *rcsid = "$OpenBSD: clnt_udp.c,v 1.16 2000/08/24 17:03:15 deraadt Ex
/*
* UDP bases client side rpc operations
*/
-static enum clnt_stat clntudp_call();
-static void clntudp_abort();
-static void clntudp_geterr();
-static bool_t clntudp_freeres();
-static bool_t clntudp_control();
-static void clntudp_destroy();
+static enum clnt_stat clntudp_call(CLIENT *, u_long, xdrproc_t, caddr_t,
+ xdrproc_t, caddr_t, struct timeval);
+static void clntudp_abort(CLIENT *);
+static void clntudp_geterr(CLIENT *, struct rpc_err *);
+static bool_t clntudp_freeres(CLIENT *, xdrproc_t, caddr_t);
+static bool_t clntudp_control(CLIENT *, u_int, void *);
+static void clntudp_destroy(CLIENT *);
static struct clnt_ops udp_ops = {
clntudp_call,
@@ -108,12 +109,12 @@ clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)
u_long program;
u_long version;
struct timeval wait;
- register int *sockp;
+ int *sockp;
u_int sendsz;
u_int recvsz;
{
CLIENT *cl;
- register struct cu_data *cu = NULL;
+ struct cu_data *cu = NULL;
struct timeval now;
struct rpc_msg call_msg;
@@ -198,7 +199,7 @@ clntudp_create(raddr, program, version, wait, sockp)
u_long program;
u_long version;
struct timeval wait;
- register int *sockp;
+ int *sockp;
{
return(clntudp_bufcreate(raddr, program, version, wait, sockp,
@@ -207,7 +208,7 @@ clntudp_create(raddr, program, version, wait, sockp)
static enum clnt_stat
clntudp_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
- register CLIENT *cl; /* client handle */
+ CLIENT *cl; /* client handle */
u_long proc; /* procedure number */
xdrproc_t xargs; /* xdr routine for args */
caddr_t argsp; /* pointer to args */
@@ -215,10 +216,10 @@ clntudp_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
caddr_t resultsp; /* pointer to results */
struct timeval utimeout; /* seconds to wait before giving up */
{
- register struct cu_data *cu = (struct cu_data *)cl->cl_private;
- register XDR *xdrs;
- register int outlen;
- register int inlen;
+ struct cu_data *cu = (struct cu_data *)cl->cl_private;
+ XDR *xdrs;
+ int outlen;
+ int inlen;
int fromlen;
fd_set *fds, readfds;
struct sockaddr_in from;
@@ -402,7 +403,7 @@ clntudp_geterr(cl, errp)
CLIENT *cl;
struct rpc_err *errp;
{
- register struct cu_data *cu = (struct cu_data *)cl->cl_private;
+ struct cu_data *cu = (struct cu_data *)cl->cl_private;
*errp = cu->cu_error;
}
@@ -414,26 +415,25 @@ clntudp_freeres(cl, xdr_res, res_ptr)
xdrproc_t xdr_res;
caddr_t res_ptr;
{
- register struct cu_data *cu = (struct cu_data *)cl->cl_private;
- register XDR *xdrs = &(cu->cu_outxdrs);
+ struct cu_data *cu = (struct cu_data *)cl->cl_private;
+ XDR *xdrs = &(cu->cu_outxdrs);
xdrs->x_op = XDR_FREE;
return ((*xdr_res)(xdrs, res_ptr));
}
static void
-clntudp_abort(/*h*/)
- /*CLIENT *h;*/
+clntudp_abort(CLIENT *clnt)
{
}
static bool_t
clntudp_control(cl, request, info)
CLIENT *cl;
- int request;
- char *info;
+ u_int request;
+ void *info;
{
- register struct cu_data *cu = (struct cu_data *)cl->cl_private;
+ struct cu_data *cu = (struct cu_data *)cl->cl_private;
switch (request) {
case CLSET_TIMEOUT:
@@ -458,10 +458,9 @@ clntudp_control(cl, request, info)
}
static void
-clntudp_destroy(cl)
- CLIENT *cl;
+clntudp_destroy(CLIENT *cl)
{
- register struct cu_data *cu = (struct cu_data *)cl->cl_private;
+ struct cu_data *cu = (struct cu_data *)cl->cl_private;
if (cu->cu_closeit) {
(void)close(cu->cu_sock);
diff --git a/lib/libc/rpc/getrpcent.c b/lib/libc/rpc/getrpcent.c
index a78a5ff3319..b241f8b9e61 100644
--- a/lib/libc/rpc/getrpcent.c
+++ b/lib/libc/rpc/getrpcent.c
@@ -29,7 +29,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: getrpcent.c,v 1.10 2001/06/27 00:58:56 lebel Exp $";
+static char *rcsid = "$OpenBSD: getrpcent.c,v 1.11 2001/09/15 13:51:00 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -63,7 +63,7 @@ static char RPCDB[] = "/etc/rpc";
static struct rpcdata *
_rpcdata()
{
- register struct rpcdata *d = rpcdata;
+ struct rpcdata *d = rpcdata;
if (d == NULL) {
d = (struct rpcdata *)calloc(1, sizeof (struct rpcdata));
@@ -74,10 +74,10 @@ _rpcdata()
struct rpcent *
getrpcbynumber(number)
- register int number;
+ int number;
{
- register struct rpcdata *d = _rpcdata();
- register struct rpcent *p;
+ struct rpcdata *d = _rpcdata();
+ struct rpcent *p;
if (d == NULL)
return (0);
@@ -115,7 +115,7 @@ void
setrpcent(f)
int f;
{
- register struct rpcdata *d = _rpcdata();
+ struct rpcdata *d = _rpcdata();
if (d == NULL)
return;
@@ -129,7 +129,7 @@ setrpcent(f)
void
endrpcent()
{
- register struct rpcdata *d = _rpcdata();
+ struct rpcdata *d = _rpcdata();
if (d == NULL)
return;
@@ -142,7 +142,7 @@ endrpcent()
struct rpcent *
getrpcent()
{
- register struct rpcdata *d = _rpcdata();
+ struct rpcdata *d = _rpcdata();
if (d == NULL)
return(NULL);
@@ -159,9 +159,9 @@ interpret(val, len)
char *val;
int len;
{
- register struct rpcdata *d = _rpcdata();
+ struct rpcdata *d = _rpcdata();
char *p;
- register char *cp, **q;
+ char *cp, **q;
if (d == NULL)
return (0);
diff --git a/lib/libc/rpc/pmap_clnt.c b/lib/libc/rpc/pmap_clnt.c
index 3cb3cafdfb6..c1d598ef051 100644
--- a/lib/libc/rpc/pmap_clnt.c
+++ b/lib/libc/rpc/pmap_clnt.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: pmap_clnt.c,v 1.9 1998/08/29 18:57:17 deraadt Exp $";
+static char *rcsid = "$OpenBSD: pmap_clnt.c,v 1.10 2001/09/15 13:51:00 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -46,9 +46,6 @@ static char *rcsid = "$OpenBSD: pmap_clnt.c,v 1.9 1998/08/29 18:57:17 deraadt Ex
static struct timeval timeout = { 5, 0 };
static struct timeval tottimeout = { 60, 0 };
-void clnt_perror();
-
-
/*
* Set a mapping between program,version and port.
* Calls the pmap service remotely to do the mapping.
@@ -62,7 +59,7 @@ pmap_set(program, version, protocol, port)
{
struct sockaddr_in myaddress;
int sock = -1;
- register CLIENT *client;
+ CLIENT *client;
struct pmap parms;
bool_t rslt;
@@ -99,7 +96,7 @@ pmap_unset(program, version)
{
struct sockaddr_in myaddress;
int sock = -1;
- register CLIENT *client;
+ CLIENT *client;
struct pmap parms;
bool_t rslt;
diff --git a/lib/libc/rpc/pmap_getmaps.c b/lib/libc/rpc/pmap_getmaps.c
index a299b88bffd..7ff09386a27 100644
--- a/lib/libc/rpc/pmap_getmaps.c
+++ b/lib/libc/rpc/pmap_getmaps.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: pmap_getmaps.c,v 1.6 1997/09/22 05:11:08 millert Exp $";
+static char *rcsid = "$OpenBSD: pmap_getmaps.c,v 1.7 2001/09/15 13:51:00 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -63,7 +63,7 @@ pmap_getmaps(address)
struct pmaplist *head = (struct pmaplist *)NULL;
int sock = -1;
struct timeval minutetimeout;
- register CLIENT *client;
+ CLIENT *client;
minutetimeout.tv_sec = 60;
minutetimeout.tv_usec = 0;
diff --git a/lib/libc/rpc/pmap_getport.c b/lib/libc/rpc/pmap_getport.c
index 21c74abd18d..5cfb63a8863 100644
--- a/lib/libc/rpc/pmap_getport.c
+++ b/lib/libc/rpc/pmap_getport.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: pmap_getport.c,v 1.6 1997/09/22 05:11:08 millert Exp $";
+static char *rcsid = "$OpenBSD: pmap_getport.c,v 1.7 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -62,7 +62,7 @@ pmap_getport(address, program, version, protocol)
{
u_short port = 0;
int sock = -1;
- register CLIENT *client;
+ CLIENT *client;
struct pmap parms;
address->sin_port = htons(PMAPPORT);
diff --git a/lib/libc/rpc/pmap_prot2.c b/lib/libc/rpc/pmap_prot2.c
index d14c7f1992f..507ad9b0916 100644
--- a/lib/libc/rpc/pmap_prot2.c
+++ b/lib/libc/rpc/pmap_prot2.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: pmap_prot2.c,v 1.3 1996/08/19 08:31:41 tholo Exp $";
+static char *rcsid = "$OpenBSD: pmap_prot2.c,v 1.4 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -83,8 +83,8 @@ static char *rcsid = "$OpenBSD: pmap_prot2.c,v 1.3 1996/08/19 08:31:41 tholo Exp
*/
bool_t
xdr_pmaplist(xdrs, rp)
- register XDR *xdrs;
- register struct pmaplist **rp;
+ XDR *xdrs;
+ struct pmaplist **rp;
{
/*
* more_elements is pre-computed in case the direction is
@@ -92,8 +92,8 @@ xdr_pmaplist(xdrs, rp)
* xdr_bool when the direction is XDR_DECODE.
*/
bool_t more_elements;
- register int freeing = (xdrs->x_op == XDR_FREE);
- register struct pmaplist **next;
+ int freeing = (xdrs->x_op == XDR_FREE);
+ struct pmaplist **next;
while (TRUE) {
more_elements = (bool_t)(*rp != NULL);
diff --git a/lib/libc/rpc/pmap_rmt.c b/lib/libc/rpc/pmap_rmt.c
index 9871ae44ab1..0183696dd44 100644
--- a/lib/libc/rpc/pmap_rmt.c
+++ b/lib/libc/rpc/pmap_rmt.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: pmap_rmt.c,v 1.18 2000/08/24 17:03:15 deraadt Exp $";
+static char *rcsid = "$OpenBSD: pmap_rmt.c,v 1.19 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -75,7 +75,7 @@ pmap_rmtcall(addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_pt
u_long *port_ptr;
{
int sock = -1;
- register CLIENT *client;
+ CLIENT *client;
struct rmtcallargs a;
struct rmtcallres r;
enum clnt_stat stat;
@@ -110,8 +110,8 @@ pmap_rmtcall(addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_pt
*/
bool_t
xdr_rmtcall_args(xdrs, cap)
- register XDR *xdrs;
- register struct rmtcallargs *cap;
+ XDR *xdrs;
+ struct rmtcallargs *cap;
{
u_int lenposition, argposition, position;
@@ -141,8 +141,8 @@ xdr_rmtcall_args(xdrs, cap)
*/
bool_t
xdr_rmtcallres(xdrs, crp)
- register XDR *xdrs;
- register struct rmtcallres *crp;
+ XDR *xdrs;
+ struct rmtcallres *crp;
{
caddr_t port_ptr;
@@ -228,14 +228,14 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
enum clnt_stat stat;
AUTH *unix_auth = authunix_create_default();
XDR xdr_stream;
- register XDR *xdrs = &xdr_stream;
+ XDR *xdrs = &xdr_stream;
int outlen, inlen, fromlen, nets;
- register int sock = -1;
+ int sock = -1;
int on = 1;
fd_set *fds = NULL, readfds;
- register int i;
+ int i;
bool_t done = FALSE;
- register u_long xid;
+ u_long xid;
u_long port;
struct in_addr *addrs;
struct sockaddr_in baddr, raddr; /* broadcast and response addresses */
diff --git a/lib/libc/rpc/rpc_callmsg.c b/lib/libc/rpc/rpc_callmsg.c
index 69f9dd9cea4..fe2e17cb8dc 100644
--- a/lib/libc/rpc/rpc_callmsg.c
+++ b/lib/libc/rpc/rpc_callmsg.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rpc_callmsg.c,v 1.6 2001/03/03 06:50:28 deraadt Exp $";
+static char *rcsid = "$OpenBSD: rpc_callmsg.c,v 1.7 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -49,11 +49,11 @@ static char *rcsid = "$OpenBSD: rpc_callmsg.c,v 1.6 2001/03/03 06:50:28 deraadt
*/
bool_t
xdr_callmsg(xdrs, cmsg)
- register XDR *xdrs;
- register struct rpc_msg *cmsg;
+ XDR *xdrs;
+ struct rpc_msg *cmsg;
{
- register int32_t *buf;
- register struct opaque_auth *oa;
+ int32_t *buf;
+ struct opaque_auth *oa;
if (xdrs->x_op == XDR_ENCODE) {
if (cmsg->rm_call.cb_cred.oa_length > MAX_AUTH_BYTES) {
diff --git a/lib/libc/rpc/rpc_prot.c b/lib/libc/rpc/rpc_prot.c
index c6168e72188..636f0629857 100644
--- a/lib/libc/rpc/rpc_prot.c
+++ b/lib/libc/rpc/rpc_prot.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rpc_prot.c,v 1.6 1998/03/19 00:27:21 millert Exp $";
+static char *rcsid = "$OpenBSD: rpc_prot.c,v 1.7 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -58,8 +58,8 @@ struct opaque_auth _null_auth;
*/
bool_t
xdr_opaque_auth(xdrs, ap)
- register XDR *xdrs;
- register struct opaque_auth *ap;
+ XDR *xdrs;
+ struct opaque_auth *ap;
{
if (xdr_enum(xdrs, &(ap->oa_flavor)))
@@ -73,8 +73,8 @@ xdr_opaque_auth(xdrs, ap)
*/
bool_t
xdr_des_block(xdrs, blkp)
- register XDR *xdrs;
- register des_block *blkp;
+ XDR *xdrs;
+ des_block *blkp;
{
return (xdr_opaque(xdrs, (caddr_t)blkp, sizeof(des_block)));
}
@@ -86,8 +86,8 @@ xdr_des_block(xdrs, blkp)
*/
bool_t
xdr_accepted_reply(xdrs, ar)
- register XDR *xdrs;
- register struct accepted_reply *ar;
+ XDR *xdrs;
+ struct accepted_reply *ar;
{
/* personalized union, rather than calling xdr_union */
@@ -113,8 +113,8 @@ xdr_accepted_reply(xdrs, ar)
*/
bool_t
xdr_rejected_reply(xdrs, rr)
- register XDR *xdrs;
- register struct rejected_reply *rr;
+ XDR *xdrs;
+ struct rejected_reply *rr;
{
/* personalized union, rather than calling xdr_union */
@@ -142,8 +142,8 @@ static struct xdr_discrim reply_dscrm[3] = {
*/
bool_t
xdr_replymsg(xdrs, rmsg)
- register XDR *xdrs;
- register struct rpc_msg *rmsg;
+ XDR *xdrs;
+ struct rpc_msg *rmsg;
{
if (xdr_u_int32_t(xdrs, &(rmsg->rm_xid)) &&
xdr_enum(xdrs, (enum_t *)&(rmsg->rm_direction)) &&
@@ -161,8 +161,8 @@ xdr_replymsg(xdrs, rmsg)
*/
bool_t
xdr_callhdr(xdrs, cmsg)
- register XDR *xdrs;
- register struct rpc_msg *cmsg;
+ XDR *xdrs;
+ struct rpc_msg *cmsg;
{
cmsg->rm_direction = CALL;
@@ -180,8 +180,8 @@ xdr_callhdr(xdrs, cmsg)
static void
accepted(acpt_stat, error)
- register enum accept_stat acpt_stat;
- register struct rpc_err *error;
+ enum accept_stat acpt_stat;
+ struct rpc_err *error;
{
switch (acpt_stat) {
@@ -218,8 +218,8 @@ accepted(acpt_stat, error)
static void
rejected(rjct_stat, error)
- register enum reject_stat rjct_stat;
- register struct rpc_err *error;
+ enum reject_stat rjct_stat;
+ struct rpc_err *error;
{
switch (rjct_stat) {
@@ -243,8 +243,8 @@ rejected(rjct_stat, error)
*/
void
_seterr_reply(msg, error)
- register struct rpc_msg *msg;
- register struct rpc_err *error;
+ struct rpc_msg *msg;
+ struct rpc_err *error;
{
/* optimized for normal, SUCCESSful case */
diff --git a/lib/libc/rpc/svc.c b/lib/libc/rpc/svc.c
index f31f8ce6a06..a4e28364391 100644
--- a/lib/libc/rpc/svc.c
+++ b/lib/libc/rpc/svc.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: svc.c,v 1.13 2001/03/03 06:50:28 deraadt Exp $";
+static char *rcsid = "$OpenBSD: svc.c,v 1.14 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -69,7 +69,7 @@ static struct svc_callout {
void (*sc_dispatch)();
} *svc_head;
-static struct svc_callout *svc_find();
+static struct svc_callout *svc_find(u_long, u_long, struct svc_callout **);
int __svc_fdsetsize;
fd_set *__svc_fdset;
@@ -94,7 +94,7 @@ int
__xprt_register(xprt)
SVCXPRT *xprt;
{
- register int sock = xprt->xp_sock;
+ int sock = xprt->xp_sock;
if (sock+1 > __svc_fdsetsize) {
int bytes = howmany(sock+1, NFDBITS) * sizeof(fd_mask);
@@ -146,7 +146,7 @@ void
xprt_unregister(xprt)
SVCXPRT *xprt;
{
- register int sock = xprt->xp_sock;
+ int sock = xprt->xp_sock;
if (xports[sock] == xprt) {
xports[sock] = (SVCXPRT *)0;
@@ -182,7 +182,7 @@ svc_register(xprt, prog, vers, dispatch, protocol)
int protocol;
{
struct svc_callout *prev;
- register struct svc_callout *s;
+ struct svc_callout *s;
if ((s = svc_find(prog, vers, &prev)) != NULL_SVC) {
if (s->sc_dispatch == dispatch)
@@ -215,7 +215,7 @@ svc_unregister(prog, vers)
u_long vers;
{
struct svc_callout *prev;
- register struct svc_callout *s;
+ struct svc_callout *s;
if ((s = svc_find(prog, vers, &prev)) == NULL_SVC)
return;
@@ -240,7 +240,7 @@ svc_find(prog, vers, prev)
u_long vers;
struct svc_callout **prev;
{
- register struct svc_callout *s, *p;
+ struct svc_callout *s, *p;
p = NULL_SVC;
for (s = svc_head; s != NULL_SVC; s = s->sc_next) {
@@ -260,7 +260,7 @@ done:
*/
bool_t
svc_sendreply(xprt, xdr_results, xdr_location)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
xdrproc_t xdr_results;
caddr_t xdr_location;
{
@@ -280,7 +280,7 @@ svc_sendreply(xprt, xdr_results, xdr_location)
*/
void
svcerr_noproc(xprt)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
{
struct rpc_msg rply;
@@ -296,7 +296,7 @@ svcerr_noproc(xprt)
*/
void
svcerr_decode(xprt)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
{
struct rpc_msg rply;
@@ -312,7 +312,7 @@ svcerr_decode(xprt)
*/
void
svcerr_systemerr(xprt)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
{
struct rpc_msg rply;
@@ -356,7 +356,7 @@ svcerr_weakauth(xprt)
*/
void
svcerr_noprog(xprt)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
{
struct rpc_msg rply;
@@ -372,7 +372,7 @@ svcerr_noprog(xprt)
*/
void
svcerr_progvers(xprt, low_vers, high_vers)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
u_long low_vers;
u_long high_vers;
{
@@ -436,10 +436,10 @@ svc_getreqset2(readfds, width)
u_long low_vers;
u_long high_vers;
struct svc_req r;
- register SVCXPRT *xprt;
- register int bit;
- register fd_mask mask, *maskp;
- register int sock;
+ SVCXPRT *xprt;
+ int bit;
+ fd_mask mask, *maskp;
+ int sock;
char cred_area[2*MAX_AUTH_BYTES + RQCRED_SIZE];
msg.rm_call.cb_cred.oa_base = cred_area;
msg.rm_call.cb_verf.oa_base = &(cred_area[MAX_AUTH_BYTES]);
diff --git a/lib/libc/rpc/svc_auth.c b/lib/libc/rpc/svc_auth.c
index ba4d82d1d8e..1e96ccbfb56 100644
--- a/lib/libc/rpc/svc_auth.c
+++ b/lib/libc/rpc/svc_auth.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: svc_auth.c,v 1.4 1998/03/19 00:27:22 millert Exp $";
+static char *rcsid = "$OpenBSD: svc_auth.c,v 1.5 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -50,8 +50,8 @@ static char *rcsid = "$OpenBSD: svc_auth.c,v 1.4 1998/03/19 00:27:22 millert Exp
*
* enum auth_stat
* flavorx_auth(rqst, msg)
- * register struct svc_req *rqst;
- * register struct rpc_msg *msg;
+ * struct svc_req *rqst;
+ * struct rpc_msg *msg;
*
*/
@@ -89,10 +89,10 @@ static struct {
*/
enum auth_stat
_authenticate(rqst, msg)
- register struct svc_req *rqst;
+ struct svc_req *rqst;
struct rpc_msg *msg;
{
- register int cred_flavor;
+ int cred_flavor;
rqst->rq_cred = msg->rm_call.cb_cred;
rqst->rq_xprt->xp_verf.oa_flavor = _null_auth.oa_flavor;
diff --git a/lib/libc/rpc/svc_auth_unix.c b/lib/libc/rpc/svc_auth_unix.c
index 8ec75d05cea..bf3f98c765b 100644
--- a/lib/libc/rpc/svc_auth_unix.c
+++ b/lib/libc/rpc/svc_auth_unix.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: svc_auth_unix.c,v 1.6 1998/11/22 07:38:25 deraadt Exp $";
+static char *rcsid = "$OpenBSD: svc_auth_unix.c,v 1.7 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -51,13 +51,13 @@ static char *rcsid = "$OpenBSD: svc_auth_unix.c,v 1.6 1998/11/22 07:38:25 deraad
*/
enum auth_stat
_svcauth_unix(rqst, msg)
- register struct svc_req *rqst;
- register struct rpc_msg *msg;
+ struct svc_req *rqst;
+ struct rpc_msg *msg;
{
- register enum auth_stat stat;
+ enum auth_stat stat;
XDR xdrs;
- register struct authunix_parms *aup;
- register int32_t *buf;
+ struct authunix_parms *aup;
+ int32_t *buf;
struct area {
struct authunix_parms area_aup;
char area_machname[MAX_MACHINE_NAME+1];
@@ -65,7 +65,7 @@ _svcauth_unix(rqst, msg)
} *area;
u_int auth_len;
u_int str_len, gid_len;
- register u_int i;
+ u_int i;
area = (struct area *) rqst->rq_clntcred;
aup = &area->area_aup;
diff --git a/lib/libc/rpc/svc_raw.c b/lib/libc/rpc/svc_raw.c
index c76197d6ac0..71d5a2010d6 100644
--- a/lib/libc/rpc/svc_raw.c
+++ b/lib/libc/rpc/svc_raw.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: svc_raw.c,v 1.5 2001/03/03 06:50:28 deraadt Exp $";
+static char *rcsid = "$OpenBSD: svc_raw.c,v 1.6 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -73,7 +73,7 @@ static struct xp_ops server_ops = {
SVCXPRT *
svcraw_create()
{
- register struct svcraw_private *srp = svcraw_private;
+ struct svcraw_private *srp = svcraw_private;
if (srp == NULL) {
srp = (struct svcraw_private *)calloc(1, sizeof (*srp));
@@ -101,8 +101,8 @@ svcraw_recv(xprt, msg)
SVCXPRT *xprt;
struct rpc_msg *msg;
{
- register struct svcraw_private *srp = svcraw_private;
- register XDR *xdrs;
+ struct svcraw_private *srp = svcraw_private;
+ XDR *xdrs;
if (srp == NULL)
return (0);
@@ -120,8 +120,8 @@ svcraw_reply(xprt, msg)
SVCXPRT *xprt;
struct rpc_msg *msg;
{
- register struct svcraw_private *srp = svcraw_private;
- register XDR *xdrs;
+ struct svcraw_private *srp = svcraw_private;
+ XDR *xdrs;
if (srp == NULL)
return (FALSE);
@@ -141,7 +141,7 @@ svcraw_getargs(xprt, xdr_args, args_ptr)
xdrproc_t xdr_args;
caddr_t args_ptr;
{
- register struct svcraw_private *srp = svcraw_private;
+ struct svcraw_private *srp = svcraw_private;
if (srp == NULL)
return (FALSE);
@@ -155,8 +155,8 @@ svcraw_freeargs(xprt, xdr_args, args_ptr)
xdrproc_t xdr_args;
caddr_t args_ptr;
{
- register struct svcraw_private *srp = svcraw_private;
- register XDR *xdrs;
+ struct svcraw_private *srp = svcraw_private;
+ XDR *xdrs;
if (srp == NULL)
return (FALSE);
diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c
index 3de72ea6e53..f40f7e8644f 100644
--- a/lib/libc/rpc/svc_tcp.c
+++ b/lib/libc/rpc/svc_tcp.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.19 2001/03/03 06:50:28 deraadt Exp $";
+static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.20 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -125,13 +125,13 @@ struct tcp_conn { /* kept in xprt->xp_p1 */
*/
SVCXPRT *
svctcp_create(sock, sendsize, recvsize)
- register int sock;
+ int sock;
u_int sendsize;
u_int recvsize;
{
bool_t madesock = FALSE;
- register SVCXPRT *xprt;
- register struct tcp_rendezvous *r;
+ SVCXPRT *xprt;
+ struct tcp_rendezvous *r;
struct sockaddr_in addr;
int len = sizeof(struct sockaddr_in);
@@ -209,8 +209,8 @@ makefd_xprt(fd, sendsize, recvsize)
u_int sendsize;
u_int recvsize;
{
- register SVCXPRT *xprt;
- register struct tcp_conn *cd;
+ SVCXPRT *xprt;
+ struct tcp_conn *cd;
xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT));
if (xprt == (SVCXPRT *)NULL) {
@@ -245,7 +245,7 @@ makefd_xprt(fd, sendsize, recvsize)
static bool_t
rendezvous_request(xprt)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
{
int sock;
struct tcp_rendezvous *r;
@@ -312,9 +312,9 @@ rendezvous_stat()
static void
svctcp_destroy(xprt)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
{
- register struct tcp_conn *cd = (struct tcp_conn *)xprt->xp_p1;
+ struct tcp_conn *cd = (struct tcp_conn *)xprt->xp_p1;
xprt_unregister(xprt);
if (xprt->xp_sock != -1)
@@ -344,11 +344,11 @@ static struct timeval wait_per_try = { 35, 0 };
*/
static int
readtcp(xprt, buf, len)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
caddr_t buf;
- register int len;
+ int len;
{
- register int sock = xprt->xp_sock;
+ int sock = xprt->xp_sock;
struct timeval start, delta;
struct timeval tmp1, tmp2;
fd_set *fds = NULL;
@@ -415,11 +415,11 @@ fatal_err:
*/
static int
writetcp(xprt, buf, len)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
caddr_t buf;
int len;
{
- register int i, cnt;
+ int i, cnt;
for (cnt = len; cnt > 0; cnt -= i, buf += i) {
if ((i = write(xprt->xp_sock, buf, cnt)) < 0) {
@@ -435,7 +435,7 @@ static enum xprt_stat
svctcp_stat(xprt)
SVCXPRT *xprt;
{
- register struct tcp_conn *cd =
+ struct tcp_conn *cd =
(struct tcp_conn *)(xprt->xp_p1);
if (cd->strm_stat == XPRT_DIED)
@@ -448,11 +448,11 @@ svctcp_stat(xprt)
static bool_t
svctcp_recv(xprt, msg)
SVCXPRT *xprt;
- register struct rpc_msg *msg;
+ struct rpc_msg *msg;
{
- register struct tcp_conn *cd =
+ struct tcp_conn *cd =
(struct tcp_conn *)(xprt->xp_p1);
- register XDR *xdrs = &(cd->xdrs);
+ XDR *xdrs = &(cd->xdrs);
xdrs->x_op = XDR_DECODE;
(void)xdrrec_skiprecord(xdrs);
@@ -480,7 +480,7 @@ svctcp_freeargs(xprt, xdr_args, args_ptr)
xdrproc_t xdr_args;
caddr_t args_ptr;
{
- register XDR *xdrs =
+ XDR *xdrs =
&(((struct tcp_conn *)(xprt->xp_p1))->xdrs);
xdrs->x_op = XDR_FREE;
@@ -490,12 +490,12 @@ svctcp_freeargs(xprt, xdr_args, args_ptr)
static bool_t
svctcp_reply(xprt, msg)
SVCXPRT *xprt;
- register struct rpc_msg *msg;
+ struct rpc_msg *msg;
{
- register struct tcp_conn *cd =
+ struct tcp_conn *cd =
(struct tcp_conn *)(xprt->xp_p1);
- register XDR *xdrs = &(cd->xdrs);
- register bool_t stat;
+ XDR *xdrs = &(cd->xdrs);
+ bool_t stat;
xdrs->x_op = XDR_ENCODE;
msg->rm_xid = cd->x_id;
diff --git a/lib/libc/rpc/svc_udp.c b/lib/libc/rpc/svc_udp.c
index 9abbc065b81..50dbc879a77 100644
--- a/lib/libc/rpc/svc_udp.c
+++ b/lib/libc/rpc/svc_udp.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: svc_udp.c,v 1.9 2001/03/03 06:50:28 deraadt Exp $";
+static char *rcsid = "$OpenBSD: svc_udp.c,v 1.10 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -51,12 +51,12 @@ static char *rcsid = "$OpenBSD: svc_udp.c,v 1.9 2001/03/03 06:50:28 deraadt Exp
#define rpc_buffer(xprt) ((xprt)->xp_p1)
#define MAX(a, b) ((a > b) ? a : b)
-static bool_t svcudp_recv();
-static bool_t svcudp_reply();
-static enum xprt_stat svcudp_stat();
-static bool_t svcudp_getargs();
-static bool_t svcudp_freeargs();
-static void svcudp_destroy();
+static bool_t svcudp_recv(SVCXPRT *, struct rpc_msg *);
+static enum xprt_stat svcudp_stat(SVCXPRT *);
+static bool_t svcudp_getargs(SVCXPRT *, xdrproc_t, caddr_t);
+static bool_t svcudp_reply(SVCXPRT *, struct rpc_msg *);
+static bool_t svcudp_freeargs(SVCXPRT *, xdrproc_t, caddr_t);
+static void svcudp_destroy(SVCXPRT *);
static void cache_set __P((SVCXPRT *, u_long));
static int cache_get __P((SVCXPRT *, struct rpc_msg *, char **, u_long *));
@@ -96,12 +96,12 @@ struct svcudp_data {
*/
SVCXPRT *
svcudp_bufcreate(sock, sendsz, recvsz)
- register int sock;
+ int sock;
u_int sendsz, recvsz;
{
bool_t madesock = FALSE;
- register SVCXPRT *xprt;
- register struct svcudp_data *su;
+ SVCXPRT *xprt;
+ struct svcudp_data *su;
struct sockaddr_in addr;
int len = sizeof(struct sockaddr_in);
@@ -187,12 +187,12 @@ svcudp_stat(xprt)
static bool_t
svcudp_recv(xprt, msg)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
struct rpc_msg *msg;
{
- register struct svcudp_data *su = su_data(xprt);
- register XDR *xdrs = &(su->su_xdrs);
- register int rlen;
+ struct svcudp_data *su = su_data(xprt);
+ XDR *xdrs = &(su->su_xdrs);
+ int rlen;
char *reply;
u_long replylen;
@@ -212,7 +212,8 @@ svcudp_recv(xprt, msg)
if (su->su_cache != NULL) {
if (cache_get(xprt, msg, &reply, &replylen)) {
(void) sendto(xprt->xp_sock, reply, (int) replylen, 0,
- (struct sockaddr *) &xprt->xp_raddr, xprt->xp_addrlen);
+ (struct sockaddr *) &xprt->xp_raddr,
+ xprt->xp_addrlen);
return (TRUE);
}
}
@@ -221,13 +222,13 @@ svcudp_recv(xprt, msg)
static bool_t
svcudp_reply(xprt, msg)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
struct rpc_msg *msg;
{
- register struct svcudp_data *su = su_data(xprt);
- register XDR *xdrs = &(su->su_xdrs);
- register int slen;
- register bool_t stat = FALSE;
+ struct svcudp_data *su = su_data(xprt);
+ XDR *xdrs = &(su->su_xdrs);
+ int slen;
+ bool_t stat = FALSE;
xdrs->x_op = XDR_ENCODE;
XDR_SETPOS(xdrs, 0);
@@ -262,7 +263,7 @@ svcudp_freeargs(xprt, xdr_args, args_ptr)
xdrproc_t xdr_args;
caddr_t args_ptr;
{
- register XDR *xdrs = &(su_data(xprt)->su_xdrs);
+ XDR *xdrs = &(su_data(xprt)->su_xdrs);
xdrs->x_op = XDR_FREE;
return ((*xdr_args)(xdrs, args_ptr));
@@ -270,9 +271,9 @@ svcudp_freeargs(xprt, xdr_args, args_ptr)
static void
svcudp_destroy(xprt)
- register SVCXPRT *xprt;
+ SVCXPRT *xprt;
{
- register struct svcudp_data *su = su_data(xprt);
+ struct svcudp_data *su = su_data(xprt);
xprt_unregister(xprt);
if (xprt->xp_sock != -1)
@@ -284,9 +285,6 @@ svcudp_destroy(xprt)
mem_free((caddr_t)xprt, sizeof(SVCXPRT));
}
-
-/***********this could be a separate file*********************/
-
/*
* Fifo cache for udp server
* Copies pointers to reply buffers into fifo cache
@@ -328,8 +326,6 @@ struct cache_node {
cache_ptr cache_next;
};
-
-
/*
* The entire cache
*/
@@ -403,9 +399,9 @@ cache_set(xprt, replylen)
SVCXPRT *xprt;
u_long replylen;
{
- register cache_ptr victim;
- register cache_ptr *vicp;
- register struct svcudp_data *su = su_data(xprt);
+ cache_ptr victim;
+ cache_ptr *vicp;
+ struct svcudp_data *su = su_data(xprt);
struct udp_cache *uc = (struct udp_cache *) su->su_cache;
u_int loc;
char *newbuf;
@@ -472,9 +468,9 @@ cache_get(xprt, msg, replyp, replylenp)
u_long *replylenp;
{
u_int loc;
- register cache_ptr ent;
- register struct svcudp_data *su = su_data(xprt);
- register struct udp_cache *uc = (struct udp_cache *) su->su_cache;
+ cache_ptr ent;
+ struct svcudp_data *su = su_data(xprt);
+ struct udp_cache *uc = (struct udp_cache *) su->su_cache;
# define EQADDR(a1, a2) (memcmp(&a1, &a2, sizeof(a1)) == 0)
diff --git a/lib/libc/rpc/xdr.c b/lib/libc/rpc/xdr.c
index 1a31136db49..efd9cfee4cb 100644
--- a/lib/libc/rpc/xdr.c
+++ b/lib/libc/rpc/xdr.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: xdr.c,v 1.5 1998/03/19 00:27:27 millert Exp $";
+static char *rcsid = "$OpenBSD: xdr.c,v 1.6 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -153,7 +153,7 @@ xdr_u_int(xdrs, up)
*/
bool_t
xdr_long(xdrs, lp)
- register XDR *xdrs;
+ XDR *xdrs;
long *lp;
{
switch (xdrs->x_op) {
@@ -174,7 +174,7 @@ xdr_long(xdrs, lp)
*/
bool_t
xdr_u_long(xdrs, ulp)
- register XDR *xdrs;
+ XDR *xdrs;
u_long *ulp;
{
switch (xdrs->x_op) {
@@ -195,7 +195,7 @@ xdr_u_long(xdrs, ulp)
*/
bool_t
xdr_int32_t(xdrs, int32_p)
- register XDR *xdrs;
+ XDR *xdrs;
int32_t *int32_p;
{
long l;
@@ -225,7 +225,7 @@ xdr_int32_t(xdrs, int32_p)
*/
bool_t
xdr_u_int32_t(xdrs, u_int32_p)
- register XDR *xdrs;
+ XDR *xdrs;
u_int32_t *u_int32_p;
{
u_long l;
@@ -255,7 +255,7 @@ xdr_u_int32_t(xdrs, u_int32_p)
*/
bool_t
xdr_short(xdrs, sp)
- register XDR *xdrs;
+ XDR *xdrs;
short *sp;
{
long l;
@@ -284,7 +284,7 @@ xdr_short(xdrs, sp)
*/
bool_t
xdr_u_short(xdrs, usp)
- register XDR *xdrs;
+ XDR *xdrs;
u_short *usp;
{
u_long l;
@@ -314,7 +314,7 @@ xdr_u_short(xdrs, usp)
*/
bool_t
xdr_int16_t(xdrs, int16_p)
- register XDR *xdrs;
+ XDR *xdrs;
int16_t *int16_p;
{
long l;
@@ -343,7 +343,7 @@ xdr_int16_t(xdrs, int16_p)
*/
bool_t
xdr_u_int16_t(xdrs, u_int16_p)
- register XDR *xdrs;
+ XDR *xdrs;
u_int16_t *u_int16_p;
{
u_long l;
@@ -409,7 +409,7 @@ xdr_u_char(xdrs, cp)
*/
bool_t
xdr_bool(xdrs, bp)
- register XDR *xdrs;
+ XDR *xdrs;
bool_t *bp;
{
long lb;
@@ -470,11 +470,11 @@ xdr_enum(xdrs, ep)
*/
bool_t
xdr_opaque(xdrs, cp, cnt)
- register XDR *xdrs;
+ XDR *xdrs;
caddr_t cp;
- register u_int cnt;
+ u_int cnt;
{
- register u_int rndup;
+ u_int rndup;
static int crud[BYTES_PER_XDR_UNIT];
/*
@@ -522,13 +522,13 @@ xdr_opaque(xdrs, cp, cnt)
*/
bool_t
xdr_bytes(xdrs, cpp, sizep, maxsize)
- register XDR *xdrs;
+ XDR *xdrs;
char **cpp;
- register u_int *sizep;
+ u_int *sizep;
u_int maxsize;
{
- register char *sp = *cpp; /* sp is the actual string pointer */
- register u_int nodesize;
+ char *sp = *cpp; /* sp is the actual string pointer */
+ u_int nodesize;
/*
* first deal with the length since xdr bytes are counted
@@ -597,13 +597,13 @@ xdr_netobj(xdrs, np)
*/
bool_t
xdr_union(xdrs, dscmp, unp, choices, dfault)
- register XDR *xdrs;
+ XDR *xdrs;
enum_t *dscmp; /* enum to decide which arm to work on */
char *unp; /* the union itself */
struct xdr_discrim *choices; /* [value, xdr proc] for each arm */
xdrproc_t dfault; /* default xdr routine */
{
- register enum_t dscm;
+ enum_t dscm;
/*
* we deal with the discriminator; it's an enum
@@ -646,11 +646,11 @@ xdr_union(xdrs, dscmp, unp, choices, dfault)
*/
bool_t
xdr_string(xdrs, cpp, maxsize)
- register XDR *xdrs;
+ XDR *xdrs;
char **cpp;
u_int maxsize;
{
- register char *sp = *cpp; /* sp is the actual string pointer */
+ char *sp = *cpp; /* sp is the actual string pointer */
u_int size;
u_int nodesize;
diff --git a/lib/libc/rpc/xdr_array.c b/lib/libc/rpc/xdr_array.c
index 281a5431ae2..94e61bd2ac5 100644
--- a/lib/libc/rpc/xdr_array.c
+++ b/lib/libc/rpc/xdr_array.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: xdr_array.c,v 1.3 1996/08/19 08:32:02 tholo Exp $";
+static char *rcsid = "$OpenBSD: xdr_array.c,v 1.4 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -57,18 +57,18 @@ static char *rcsid = "$OpenBSD: xdr_array.c,v 1.3 1996/08/19 08:32:02 tholo Exp
*/
bool_t
xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
- register XDR *xdrs;
+ XDR *xdrs;
caddr_t *addrp; /* array pointer */
u_int *sizep; /* number of elements */
u_int maxsize; /* max numberof elements */
u_int elsize; /* size in bytes of each element */
xdrproc_t elproc; /* xdr routine to handle each element */
{
- register u_int i;
- register caddr_t target = *addrp;
- register u_int c; /* the actual element count */
- register bool_t stat = TRUE;
- register u_int nodesize;
+ u_int i;
+ caddr_t target = *addrp;
+ u_int c; /* the actual element count */
+ bool_t stat = TRUE;
+ u_int nodesize;
/* like strings, arrays are really counted arrays */
if (! xdr_u_int(xdrs, sizep)) {
@@ -132,14 +132,14 @@ xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
*/
bool_t
xdr_vector(xdrs, basep, nelem, elemsize, xdr_elem)
- register XDR *xdrs;
- register char *basep;
- register u_int nelem;
- register u_int elemsize;
- register xdrproc_t xdr_elem;
+ XDR *xdrs;
+ char *basep;
+ u_int nelem;
+ u_int elemsize;
+ xdrproc_t xdr_elem;
{
- register u_int i;
- register char *elptr;
+ u_int i;
+ char *elptr;
elptr = basep;
for (i = 0; i < nelem; i++) {
diff --git a/lib/libc/rpc/xdr_float.c b/lib/libc/rpc/xdr_float.c
index 5c04bbb97ce..ee137153565 100644
--- a/lib/libc/rpc/xdr_float.c
+++ b/lib/libc/rpc/xdr_float.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: xdr_float.c,v 1.9 2000/04/30 04:58:23 bjc Exp $";
+static char *rcsid = "$OpenBSD: xdr_float.c,v 1.10 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -93,8 +93,8 @@ static struct sgl_limits {
bool_t
xdr_float(xdrs, fp)
- register XDR *xdrs;
- register float *fp;
+ XDR *xdrs;
+ float *fp;
{
#ifdef IEEEFP
bool_t rv;
@@ -200,18 +200,18 @@ static struct dbl_limits {
bool_t
xdr_double(xdrs, dp)
- register XDR *xdrs;
+ XDR *xdrs;
double *dp;
{
#ifdef IEEEFP
- register int32_t *i32p;
+ int32_t *i32p;
bool_t rv;
long tmpl;
#else
- register long *lp;
+ long *lp;
struct ieee_double id;
struct vax_double vd;
- register struct dbl_limits *lim;
+ struct dbl_limits *lim;
int i;
#endif
diff --git a/lib/libc/rpc/xdr_mem.c b/lib/libc/rpc/xdr_mem.c
index 0277b8685f2..de0ad3c92f6 100644
--- a/lib/libc/rpc/xdr_mem.c
+++ b/lib/libc/rpc/xdr_mem.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: xdr_mem.c,v 1.6 1996/11/14 06:33:13 etheisen Exp $";
+static char *rcsid = "$OpenBSD: xdr_mem.c,v 1.7 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -48,17 +48,17 @@ static char *rcsid = "$OpenBSD: xdr_mem.c,v 1.6 1996/11/14 06:33:13 etheisen Exp
#include <rpc/xdr.h>
#include <netinet/in.h>
-static bool_t xdrmem_getlong_aligned();
-static bool_t xdrmem_putlong_aligned();
-static bool_t xdrmem_getlong_unaligned();
-static bool_t xdrmem_putlong_unaligned();
-static bool_t xdrmem_getbytes();
-static bool_t xdrmem_putbytes();
-static u_int xdrmem_getpos(); /* XXX w/64-bit pointers, u_int not enough! */
-static bool_t xdrmem_setpos();
-static int32_t *xdrmem_inline_aligned();
-static int32_t *xdrmem_inline_unaligned();
-static void xdrmem_destroy();
+static bool_t xdrmem_getlong_aligned(XDR *, long *);
+static bool_t xdrmem_putlong_aligned(XDR *, long *);
+static bool_t xdrmem_getlong_unaligned(XDR *, long *);
+static bool_t xdrmem_putlong_unaligned(XDR *, long *);
+static bool_t xdrmem_getbytes(XDR *, caddr_t, u_int);
+static bool_t xdrmem_putbytes(XDR *, caddr_t, u_int);
+static u_int xdrmem_getpos(XDR *); /* XXX w/64-bit pointers, u_int not enough! */
+static bool_t xdrmem_setpos(XDR *, u_int);
+static int32_t *xdrmem_inline_aligned(XDR *, u_int);
+static int32_t *xdrmem_inline_unaligned(XDR *, u_int);
+static void xdrmem_destroy(XDR *);
static struct xdr_ops xdrmem_ops_aligned = {
xdrmem_getlong_aligned,
@@ -88,7 +88,7 @@ static struct xdr_ops xdrmem_ops_unaligned = {
*/
void
xdrmem_create(xdrs, addr, size, op)
- register XDR *xdrs;
+ XDR *xdrs;
caddr_t addr;
u_int size;
enum xdr_op op;
@@ -102,15 +102,15 @@ xdrmem_create(xdrs, addr, size, op)
}
static void
-xdrmem_destroy(/*xdrs*/)
- /*XDR *xdrs;*/
+xdrmem_destroy(XDR *xdrs)
+
{
}
static bool_t
xdrmem_getlong_aligned(xdrs, lp)
- register XDR *xdrs;
+ XDR *xdrs;
long *lp;
{
@@ -123,7 +123,7 @@ xdrmem_getlong_aligned(xdrs, lp)
static bool_t
xdrmem_putlong_aligned(xdrs, lp)
- register XDR *xdrs;
+ XDR *xdrs;
long *lp;
{
@@ -136,7 +136,7 @@ xdrmem_putlong_aligned(xdrs, lp)
static bool_t
xdrmem_getlong_unaligned(xdrs, lp)
- register XDR *xdrs;
+ XDR *xdrs;
long *lp;
{
int32_t l;
@@ -151,7 +151,7 @@ xdrmem_getlong_unaligned(xdrs, lp)
static bool_t
xdrmem_putlong_unaligned(xdrs, lp)
- register XDR *xdrs;
+ XDR *xdrs;
long *lp;
{
int32_t l;
@@ -166,9 +166,9 @@ xdrmem_putlong_unaligned(xdrs, lp)
static bool_t
xdrmem_getbytes(xdrs, addr, len)
- register XDR *xdrs;
+ XDR *xdrs;
caddr_t addr;
- register u_int len;
+ u_int len;
{
if ((xdrs->x_handy -= len) < 0)
@@ -180,9 +180,9 @@ xdrmem_getbytes(xdrs, addr, len)
static bool_t
xdrmem_putbytes(xdrs, addr, len)
- register XDR *xdrs;
+ XDR *xdrs;
caddr_t addr;
- register u_int len;
+ u_int len;
{
if ((xdrs->x_handy -= len) < 0)
@@ -194,7 +194,7 @@ xdrmem_putbytes(xdrs, addr, len)
static u_int
xdrmem_getpos(xdrs)
- register XDR *xdrs;
+ XDR *xdrs;
{
/* XXX w/64-bit pointers, u_int not enough! */
@@ -203,11 +203,11 @@ xdrmem_getpos(xdrs)
static bool_t
xdrmem_setpos(xdrs, pos)
- register XDR *xdrs;
+ XDR *xdrs;
u_int pos;
{
- register caddr_t newaddr = xdrs->x_base + pos;
- register caddr_t lastaddr = xdrs->x_private + xdrs->x_handy;
+ caddr_t newaddr = xdrs->x_base + pos;
+ caddr_t lastaddr = xdrs->x_private + xdrs->x_handy;
if ((long)newaddr > (long)lastaddr)
return (FALSE);
@@ -218,8 +218,8 @@ xdrmem_setpos(xdrs, pos)
static int32_t *
xdrmem_inline_aligned(xdrs, len)
- register XDR *xdrs;
- int len;
+ XDR *xdrs;
+ u_int len;
{
int32_t *buf = 0;
@@ -234,8 +234,8 @@ xdrmem_inline_aligned(xdrs, len)
/* ARGSUSED */
static int32_t *
xdrmem_inline_unaligned(xdrs, len)
- register XDR *xdrs;
- int len;
+ XDR *xdrs;
+ u_int len;
{
return (0);
diff --git a/lib/libc/rpc/xdr_rec.c b/lib/libc/rpc/xdr_rec.c
index ba07613c975..d77bdca7254 100644
--- a/lib/libc/rpc/xdr_rec.c
+++ b/lib/libc/rpc/xdr_rec.c
@@ -27,7 +27,7 @@
* Mountain View, California 94043
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: xdr_rec.c,v 1.7 2001/03/03 06:50:28 deraadt Exp $";
+static char *rcsid = "$OpenBSD: xdr_rec.c,v 1.8 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -54,20 +54,14 @@ static char *rcsid = "$OpenBSD: xdr_rec.c,v 1.7 2001/03/03 06:50:28 deraadt Exp
#include <rpc/xdr.h>
#include <netinet/in.h>
-static u_int fix_buf_size();
-static bool_t flush_out();
-static bool_t get_input_bytes();
-static bool_t set_input_fragment();
-static bool_t skip_input_bytes();
-
-static bool_t xdrrec_getlong();
-static bool_t xdrrec_putlong();
-static bool_t xdrrec_getbytes();
-static bool_t xdrrec_putbytes();
-static u_int xdrrec_getpos();
-static bool_t xdrrec_setpos();
-static int32_t *xdrrec_inline();
-static void xdrrec_destroy();
+static bool_t xdrrec_getlong(XDR *, long *);
+static bool_t xdrrec_putlong(XDR *, long *);
+static bool_t xdrrec_getbytes(XDR *, caddr_t, u_int);
+static bool_t xdrrec_putbytes(XDR *, caddr_t, u_int);
+static u_int xdrrec_getpos(XDR *);
+static bool_t xdrrec_setpos(XDR *, u_int);
+static int32_t *xdrrec_inline(XDR *, u_int);
+static void xdrrec_destroy(XDR *);
static struct xdr_ops xdrrec_ops = {
xdrrec_getlong,
@@ -121,6 +115,12 @@ typedef struct rec_strm {
u_int recvsize;
} RECSTREAM;
+static u_int fix_buf_size(u_int);
+static bool_t flush_out(RECSTREAM *, bool_t);
+static bool_t get_input_bytes(RECSTREAM *, caddr_t, int);
+static bool_t set_input_fragment(RECSTREAM *);
+static bool_t skip_input_bytes(RECSTREAM *, long);
+
/*
* Create an xdr handle for xdrrec
@@ -133,14 +133,14 @@ typedef struct rec_strm {
*/
void
xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit)
- register XDR *xdrs;
- register u_int sendsize;
- register u_int recvsize;
+ XDR *xdrs;
+ u_int sendsize;
+ u_int recvsize;
caddr_t tcp_handle;
int (*readit)(); /* like read, but pass it a tcp_handle, not sock */
int (*writeit)(); /* like write, but pass it a tcp_handle, not sock */
{
- register RECSTREAM *rstrm =
+ RECSTREAM *rstrm =
(RECSTREAM *)mem_alloc(sizeof(RECSTREAM));
if (rstrm == NULL) {
@@ -197,8 +197,8 @@ xdrrec_getlong(xdrs, lp)
XDR *xdrs;
long *lp;
{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
- register int32_t *buflp = (int32_t *)(rstrm->in_finger);
+ RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
+ int32_t *buflp = (int32_t *)(rstrm->in_finger);
int32_t mylong;
/* first try the inline, fast case */
@@ -208,7 +208,8 @@ xdrrec_getlong(xdrs, lp)
rstrm->fbtbc -= sizeof(int32_t);
rstrm->in_finger += sizeof(int32_t);
} else {
- if (! xdrrec_getbytes(xdrs, (caddr_t)&mylong, sizeof(int32_t)))
+ if (! xdrrec_getbytes(xdrs, (caddr_t)(void *)&mylong,
+ sizeof(int32_t)))
return (FALSE);
*lp = (long)ntohl((u_int32_t)mylong);
}
@@ -220,8 +221,8 @@ xdrrec_putlong(xdrs, lp)
XDR *xdrs;
long *lp;
{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
- register int32_t *dest_lp = ((int32_t *)(rstrm->out_finger));
+ RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
+ int32_t *dest_lp = ((int32_t *)(rstrm->out_finger));
if ((rstrm->out_finger += sizeof(int32_t)) > rstrm->out_boundry) {
/*
@@ -232,7 +233,7 @@ xdrrec_putlong(xdrs, lp)
rstrm->frag_sent = TRUE;
if (! flush_out(rstrm, FALSE))
return (FALSE);
- dest_lp = ((int32_t *)(rstrm->out_finger));
+ dest_lp = ((int32_t *)(void *)(rstrm->out_finger));
rstrm->out_finger += sizeof(int32_t);
}
*dest_lp = (int32_t)htonl((u_int32_t)(*lp));
@@ -242,11 +243,11 @@ xdrrec_putlong(xdrs, lp)
static bool_t /* must manage buffers, fragments, and records */
xdrrec_getbytes(xdrs, addr, len)
XDR *xdrs;
- register caddr_t addr;
- register u_int len;
+ caddr_t addr;
+ u_int len;
{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
- register int current;
+ RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
+ int current;
while (len > 0) {
current = rstrm->fbtbc;
@@ -270,11 +271,11 @@ xdrrec_getbytes(xdrs, addr, len)
static bool_t
xdrrec_putbytes(xdrs, addr, len)
XDR *xdrs;
- register caddr_t addr;
- register u_int len;
+ caddr_t addr;
+ u_int len;
{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
- register long current;
+ RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
+ long current;
while (len > 0) {
current = (u_long)rstrm->out_boundry -
@@ -295,10 +296,10 @@ xdrrec_putbytes(xdrs, addr, len)
static u_int
xdrrec_getpos(xdrs)
- register XDR *xdrs;
+ XDR *xdrs;
{
- register RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
- register long pos;
+ RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
+ long pos;
pos = lseek((int)(long)rstrm->tcp_handle, (off_t)0, 1);
if (pos != -1)
@@ -321,10 +322,10 @@ xdrrec_getpos(xdrs)
static bool_t
xdrrec_setpos(xdrs, pos)
- register XDR *xdrs;
+ XDR *xdrs;
u_int pos;
{
- register RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
+ RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
u_int currpos = xdrrec_getpos(xdrs);
int delta = currpos - pos;
caddr_t newpos;
@@ -357,10 +358,10 @@ xdrrec_setpos(xdrs, pos)
static int32_t *
xdrrec_inline(xdrs, len)
- register XDR *xdrs;
- int len;
+ XDR *xdrs;
+ u_int len;
{
- register RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
+ RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
int32_t *buf = NULL;
switch (xdrs->x_op) {
@@ -386,9 +387,9 @@ xdrrec_inline(xdrs, len)
static void
xdrrec_destroy(xdrs)
- register XDR *xdrs;
+ XDR *xdrs;
{
- register RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
+ RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
mem_free(rstrm->the_buffer,
rstrm->sendsize + rstrm->recvsize + BYTES_PER_XDR_UNIT);
@@ -408,7 +409,7 @@ bool_t
xdrrec_skiprecord(xdrs)
XDR *xdrs;
{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
+ RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
while (rstrm->fbtbc > 0 || (! rstrm->last_frag)) {
if (! skip_input_bytes(rstrm, rstrm->fbtbc))
@@ -430,7 +431,7 @@ bool_t
xdrrec_eof(xdrs)
XDR *xdrs;
{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
+ RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
while (rstrm->fbtbc > 0 || (! rstrm->last_frag)) {
if (! skip_input_bytes(rstrm, rstrm->fbtbc))
@@ -455,8 +456,8 @@ xdrrec_endofrecord(xdrs, sendnow)
XDR *xdrs;
bool_t sendnow;
{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
- register u_long len; /* fragment length */
+ RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
+ u_long len; /* fragment length */
if (sendnow || rstrm->frag_sent ||
((u_long)rstrm->out_finger + sizeof(u_int32_t) >=
@@ -478,11 +479,11 @@ xdrrec_endofrecord(xdrs, sendnow)
*/
static bool_t
flush_out(rstrm, eor)
- register RECSTREAM *rstrm;
+ RECSTREAM *rstrm;
bool_t eor;
{
- register u_long eormask = (eor == TRUE) ? LAST_FRAG : 0;
- register u_int32_t len = (u_long)(rstrm->out_finger) -
+ u_long eormask = (eor == TRUE) ? LAST_FRAG : 0;
+ u_int32_t len = (u_long)(rstrm->out_finger) -
(u_long)(rstrm->frag_header) - sizeof(u_int32_t);
*(rstrm->frag_header) = htonl(len | eormask);
@@ -497,11 +498,11 @@ flush_out(rstrm, eor)
static bool_t /* knows nothing about records! Only about input buffers */
fill_input_buf(rstrm)
- register RECSTREAM *rstrm;
+ RECSTREAM *rstrm;
{
- register caddr_t where;
+ caddr_t where;
u_long i;
- register long len;
+ long len;
where = rstrm->in_base;
i = (u_long)rstrm->in_boundry % BYTES_PER_XDR_UNIT;
@@ -517,11 +518,11 @@ fill_input_buf(rstrm)
static bool_t /* knows nothing about records! Only about input buffers */
get_input_bytes(rstrm, addr, len)
- register RECSTREAM *rstrm;
- register caddr_t addr;
- register int len;
+ RECSTREAM *rstrm;
+ caddr_t addr;
+ int len;
{
- register long current;
+ long current;
while (len > 0) {
current = (long)rstrm->in_boundry - (long)rstrm->in_finger;
@@ -541,7 +542,7 @@ get_input_bytes(rstrm, addr, len)
static bool_t /* next four bytes of the input stream are treated as a header */
set_input_fragment(rstrm)
- register RECSTREAM *rstrm;
+ RECSTREAM *rstrm;
{
u_int32_t header;
@@ -557,10 +558,10 @@ set_input_fragment(rstrm)
static bool_t /* consumes input bytes; knows nothing about records! */
skip_input_bytes(rstrm, cnt)
- register RECSTREAM *rstrm;
+ RECSTREAM *rstrm;
long cnt;
{
- register long current;
+ long current;
while (cnt > 0) {
current = (long)rstrm->in_boundry - (long)rstrm->in_finger;
@@ -578,7 +579,7 @@ skip_input_bytes(rstrm, cnt)
static u_int
fix_buf_size(s)
- register u_int s;
+ u_int s;
{
if (s < 100)
diff --git a/lib/libc/rpc/xdr_reference.c b/lib/libc/rpc/xdr_reference.c
index 5276e7c6c42..0cc8df8030f 100644
--- a/lib/libc/rpc/xdr_reference.c
+++ b/lib/libc/rpc/xdr_reference.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: xdr_reference.c,v 1.3 1996/08/19 08:32:06 tholo Exp $";
+static char *rcsid = "$OpenBSD: xdr_reference.c,v 1.4 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -57,13 +57,13 @@ static char *rcsid = "$OpenBSD: xdr_reference.c,v 1.3 1996/08/19 08:32:06 tholo
*/
bool_t
xdr_reference(xdrs, pp, size, proc)
- register XDR *xdrs;
+ XDR *xdrs;
caddr_t *pp; /* the pointer to work on */
u_int size; /* size of the object pointed to */
xdrproc_t proc; /* xdr routine to handle the object */
{
- register caddr_t loc = *pp;
- register bool_t stat;
+ caddr_t loc = *pp;
+ bool_t stat;
if (loc == NULL)
switch (xdrs->x_op) {
@@ -112,7 +112,7 @@ xdr_reference(xdrs, pp, size, proc)
*/
bool_t
xdr_pointer(xdrs,objpp,obj_size,xdr_obj)
- register XDR *xdrs;
+ XDR *xdrs;
char **objpp;
u_int obj_size;
xdrproc_t xdr_obj;
diff --git a/lib/libc/rpc/xdr_stdio.c b/lib/libc/rpc/xdr_stdio.c
index c34ec63a349..902a7458fc2 100644
--- a/lib/libc/rpc/xdr_stdio.c
+++ b/lib/libc/rpc/xdr_stdio.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: xdr_stdio.c,v 1.4 1996/09/15 09:31:44 tholo Exp $";
+static char *rcsid = "$OpenBSD: xdr_stdio.c,v 1.5 2001/09/15 13:51:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -45,14 +45,14 @@ static char *rcsid = "$OpenBSD: xdr_stdio.c,v 1.4 1996/09/15 09:31:44 tholo Exp
#include <stdio.h>
#include <rpc/xdr.h>
-static bool_t xdrstdio_getlong();
-static bool_t xdrstdio_putlong();
-static bool_t xdrstdio_getbytes();
-static bool_t xdrstdio_putbytes();
-static u_int xdrstdio_getpos();
-static bool_t xdrstdio_setpos();
-static int32_t *xdrstdio_inline();
-static void xdrstdio_destroy();
+static bool_t xdrstdio_getlong(XDR *, long *);
+static bool_t xdrstdio_putlong(XDR *, long *);
+static bool_t xdrstdio_getbytes(XDR *, caddr_t, u_int);
+static bool_t xdrstdio_putbytes(XDR *, caddr_t, u_int);
+static u_int xdrstdio_getpos(XDR *);
+static bool_t xdrstdio_setpos(XDR *, u_int);
+static int32_t *xdrstdio_inline(XDR *, u_int);
+static void xdrstdio_destroy(XDR *);
/*
* Ops vector for stdio type XDR
@@ -75,7 +75,7 @@ static struct xdr_ops xdrstdio_ops = {
*/
void
xdrstdio_create(xdrs, file, op)
- register XDR *xdrs;
+ XDR *xdrs;
FILE *file;
enum xdr_op op;
{
@@ -93,7 +93,7 @@ xdrstdio_create(xdrs, file, op)
*/
static void
xdrstdio_destroy(xdrs)
- register XDR *xdrs;
+ XDR *xdrs;
{
(void)fflush((FILE *)xdrs->x_private);
/* xx should we close the file ?? */
@@ -102,7 +102,7 @@ xdrstdio_destroy(xdrs)
static bool_t
xdrstdio_getlong(xdrs, lp)
XDR *xdrs;
- register long *lp;
+ long *lp;
{
if (fread((caddr_t)lp, sizeof(int32_t), 1,