summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>1996-12-14 06:49:36 +0000
committertholo <tholo@openbsd.org>1996-12-14 06:49:36 +0000
commit198c6cf51167a9bc60fc9a12c29bdced0df8c37a (patch)
tree2fefa1099cd0f864190c186748307f8d10bba747 /lib/libc/rpc
parentNow does not display responses to other peoples stuff, like UDP packets (diff)
downloadwireguard-openbsd-198c6cf51167a9bc60fc9a12c29bdced0df8c37a.tar.xz
wireguard-openbsd-198c6cf51167a9bc60fc9a12c29bdced0df8c37a.zip
Clean up lint and compile warnings
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r--lib/libc/rpc/auth_unix.c9
-rw-r--r--lib/libc/rpc/clnt_raw.c4
-rw-r--r--lib/libc/rpc/xdr.c20
3 files changed, 18 insertions, 15 deletions
diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c
index 47273617f8a..56c4e2eb204 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.6 1996/11/14 05:45:16 etheisen Exp $";
+static char *rcsid = "$OpenBSD: auth_unix.c,v 1.7 1996/12/14 06:49:40 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -170,11 +170,12 @@ authunix_create(machname, uid, gid, len, aup_gids)
AUTH *
authunix_create_default()
{
- register int len;
+ register int len, i;
char machname[MAX_MACHINE_NAME + 1];
register uid_t uid;
register gid_t gid;
gid_t gids[NGRPS];
+ int gids2[NGRPS];
if (gethostname(machname, MAX_MACHINE_NAME) == -1)
abort();
@@ -183,7 +184,9 @@ authunix_create_default()
gid = getegid();
if ((len = getgroups(NGRPS, gids)) < 0)
abort();
- return (authunix_create(machname, uid, gid, len, gids));
+ for (i = 0; i < len; i++)
+ gids2[i] = gids[i];
+ return (authunix_create(machname, uid, gid, len, gids2));
}
/*
diff --git a/lib/libc/rpc/clnt_raw.c b/lib/libc/rpc/clnt_raw.c
index 9c3a75135df..e9cf2455f89 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.4 1996/09/15 09:31:32 tholo Exp $";
+static char *rcsid = "$OpenBSD: clnt_raw.c,v 1.5 1996/12/14 06:49:41 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -149,7 +149,7 @@ call_again:
XDR_SETPOS(xdrs, 0);
((struct rpc_msg *)clp->mashl_callmsg)->rm_xid ++ ;
if ((! XDR_PUTBYTES(xdrs, clp->mashl_callmsg, clp->mcnt)) ||
- (! XDR_PUTLONG(xdrs, &proc)) ||
+ (! XDR_PUTLONG(xdrs, (long *)&proc)) ||
(! AUTH_MARSHALL(h->cl_auth, xdrs)) ||
(! (*xargs)(xdrs, argsp))) {
return (RPC_CANTENCODEARGS);
diff --git a/lib/libc/rpc/xdr.c b/lib/libc/rpc/xdr.c
index 6272a1dbb92..989efb30c19 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.3 1996/08/19 08:32:01 tholo Exp $";
+static char *rcsid = "$OpenBSD: xdr.c,v 1.4 1996/12/14 06:49:42 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -131,10 +131,10 @@ xdr_u_int(xdrs, up)
case XDR_ENCODE:
l = (u_long) *up;
- return (XDR_PUTLONG(xdrs, &l));
+ return (XDR_PUTLONG(xdrs, (long *)&l));
case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, &l)) {
+ if (!XDR_GETLONG(xdrs, (long *)&l)) {
return (FALSE);
}
*up = (u_int) l;
@@ -234,10 +234,10 @@ xdr_u_int32_t(xdrs, u_int32_p)
case XDR_ENCODE:
l = (u_long) *u_int32_p;
- return (XDR_PUTLONG(xdrs, &l));
+ return (XDR_PUTLONG(xdrs, (long *)&l));
case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, &l)) {
+ if (!XDR_GETLONG(xdrs, (long *)&l)) {
return (FALSE);
}
*u_int32_p = (u_int32_t) l;
@@ -293,10 +293,10 @@ xdr_u_short(xdrs, usp)
case XDR_ENCODE:
l = (u_long) *usp;
- return (XDR_PUTLONG(xdrs, &l));
+ return (XDR_PUTLONG(xdrs, (long *)&l));
case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, &l)) {
+ if (!XDR_GETLONG(xdrs, (long *)&l)) {
return (FALSE);
}
*usp = (u_short) l;
@@ -352,10 +352,10 @@ xdr_u_int16_t(xdrs, u_int16_p)
case XDR_ENCODE:
l = (u_long) *u_int16_p;
- return (XDR_PUTLONG(xdrs, &l));
+ return (XDR_PUTLONG(xdrs, (long *)&l));
case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, &l)) {
+ if (!XDR_GETLONG(xdrs, (long *)&l)) {
return (FALSE);
}
*u_int16_p = (u_int16_t) l;
@@ -458,7 +458,7 @@ xdr_enum(xdrs, ep)
}
#else
(void) (xdr_short(xdrs, (short *)ep));
- (void) (xdr_int(xdrs, (short *)ep));
+ (void) (xdr_int(xdrs, (int *)ep));
return (xdr_long(xdrs, (long *)ep));
#endif
}