summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-02-05 23:43:43 +0000
committeralfred <alfred@FreeBSD.org>2002-02-05 23:43:43 +0000
commit568956257500195a80a63ba67f283e98c05c43c1 (patch)
treeca23ccb17e63c2c0a7eeb6827d3211f8f37a1089 /lib/libc/rpc
parentfbd5ea601d57ce0f9ffdf4197a2613cb7cbc8fe2 (diff)
downloadFreeBSD-src-568956257500195a80a63ba67f283e98c05c43c1.zip
FreeBSD-src-568956257500195a80a63ba67f283e98c05c43c1.tar.gz
Fix cc -Wall, fix rcsid warnings, add missing prototypes,
change prototypes to be the same as in the original sun tirpc code. Remove ()P macro in a file where the mayority had ()P already removed. Add them if the mayority use ()P macros. Submitted by: mbr Requested by: bde
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r--lib/libc/rpc/auth_time.c5
-rw-r--r--lib/libc/rpc/clnt_bcast.c3
-rw-r--r--lib/libc/rpc/clnt_dg.c2
-rw-r--r--lib/libc/rpc/des_crypt.c2
-rw-r--r--lib/libc/rpc/getpublickey.c2
-rw-r--r--lib/libc/rpc/key_call.c5
-rw-r--r--lib/libc/rpc/key_prot_xdr.c6
-rw-r--r--lib/libc/rpc/netname.c4
-rw-r--r--lib/libc/rpc/netnamer.c4
-rw-r--r--lib/libc/rpc/rpc_generic.c2
-rw-r--r--lib/libc/rpc/rpc_soc.c4
-rw-r--r--lib/libc/rpc/rpcb_prot.c2
-rw-r--r--lib/libc/rpc/rpcdname.c2
-rw-r--r--lib/libc/rpc/svc_auth_des.c2
-rw-r--r--lib/libc/rpc/svc_simple.c5
-rw-r--r--lib/libc/rpc/svc_vc.c1
16 files changed, 31 insertions, 20 deletions
diff --git a/lib/libc/rpc/auth_time.c b/lib/libc/rpc/auth_time.c
index f352c6d..d142769 100644
--- a/lib/libc/rpc/auth_time.c
+++ b/lib/libc/rpc/auth_time.c
@@ -1,4 +1,4 @@
-#pragma ident "@(#)auth_time.c 1.4 92/11/10 SMI"
+/* #pragma ident "@(#)auth_time.c 1.4 92/11/10 SMI" */
/*
* auth_time.c
@@ -26,9 +26,6 @@
* and returned. The SIGALRM processing is modified only if
* needed to deal with TCP connections.
*
- * NOTE: This code has had the crap beaten out it in order to convert
- * it from TI-RPC back to TD-RPC for use on FreeBSD.
- *
* $FreeBSD$
*/
#include "namespace.h"
diff --git a/lib/libc/rpc/clnt_bcast.c b/lib/libc/rpc/clnt_bcast.c
index e2173464..7917c06 100644
--- a/lib/libc/rpc/clnt_bcast.c
+++ b/lib/libc/rpc/clnt_bcast.c
@@ -269,13 +269,14 @@ rpc_broadcast_exp(prog, vers, proc, xargs, argsp, xresults, resultsp,
size_t fdlistno = 0;
struct r_rpcb_rmtcallargs barg; /* Remote arguments */
struct r_rpcb_rmtcallres bres; /* Remote results */
- size_t outlen, outlen_pmap;
+ size_t outlen;
struct netconfig *nconf;
int msec;
int pollretval;
int fds_found;
#ifdef PORTMAP
+ size_t outlen_pmap = 0;
u_long port; /* Remote port number */
int pmap_flag = 0; /* UDP exists ? */
char *outbuf_pmap = NULL;
diff --git a/lib/libc/rpc/clnt_dg.c b/lib/libc/rpc/clnt_dg.c
index e46c008..59869bf 100644
--- a/lib/libc/rpc/clnt_dg.c
+++ b/lib/libc/rpc/clnt_dg.c
@@ -311,7 +311,6 @@ clnt_dg_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
struct timeval retransmit_time;
struct timeval startime, curtime;
int firsttimeout = 1;
- int dtbsize = __rpc_dtbsize();
struct sockaddr *sa;
sigset_t mask;
sigset_t newmask;
@@ -320,6 +319,7 @@ clnt_dg_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
int rpc_lock_value;
u_int32_t xid;
+ outlen = 0;
sigfillset(&newmask);
thr_sigsetmask(SIG_SETMASK, &newmask, &mask);
mutex_lock(&clnt_fd_lock);
diff --git a/lib/libc/rpc/des_crypt.c b/lib/libc/rpc/des_crypt.c
index fa71d5c..7c68267 100644
--- a/lib/libc/rpc/des_crypt.c
+++ b/lib/libc/rpc/des_crypt.c
@@ -42,7 +42,7 @@ static const char rcsid[] = "$FreeBSD$";
static int common_crypt __P(( char *, char *, register unsigned, unsigned, struct desparams * ));
int (*__des_crypt_LOCAL)() = 0;
-extern _des_crypt_call __P(( char *, int, struct desparams * ));
+extern int _des_crypt_call __P((char *, int, struct desparams *));
/*
* Copy 8 bytes
*/
diff --git a/lib/libc/rpc/getpublickey.c b/lib/libc/rpc/getpublickey.c
index 6c8fe5e..4181df8 100644
--- a/lib/libc/rpc/getpublickey.c
+++ b/lib/libc/rpc/getpublickey.c
@@ -168,7 +168,7 @@ getpublicandprivatekey(key, ret)
}
int getpublickey(netname, publickey)
- char *netname;
+ const char *netname;
char *publickey;
{
if (__getpublickey_LOCAL != NULL)
diff --git a/lib/libc/rpc/key_call.c b/lib/libc/rpc/key_call.c
index ef0f241..00df403 100644
--- a/lib/libc/rpc/key_call.c
+++ b/lib/libc/rpc/key_call.c
@@ -32,7 +32,7 @@
#ident "@(#)key_call.c 1.25 94/04/24 SMI"
-#ifndef lint
+#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
@@ -379,8 +379,7 @@ int vers;
endnetconfig(localhandle);
return ((CLIENT *) NULL);
}
-
- while (nconf = getnetconfig(localhandle)) {
+ while ((nconf = getnetconfig(localhandle)) != NULL) {
if (strcmp(nconf->nc_protofmly, NC_LOOPBACK) == 0) {
/*
* We use COTS_ORD here so that the caller can
diff --git a/lib/libc/rpc/key_prot_xdr.c b/lib/libc/rpc/key_prot_xdr.c
index 298a451..2329997 100644
--- a/lib/libc/rpc/key_prot_xdr.c
+++ b/lib/libc/rpc/key_prot_xdr.c
@@ -106,6 +106,8 @@ xdr_cryptkeyres(register XDR *xdrs, cryptkeyres *objp)
if (!xdr_des_block(xdrs, &objp->cryptkeyres_u.deskey))
return (FALSE);
break;
+ default:
+ break;
}
return (TRUE);
}
@@ -135,6 +137,8 @@ xdr_getcredres(register XDR *xdrs, getcredres *objp)
if (!xdr_unixcred(xdrs, &objp->getcredres_u.cred))
return (FALSE);
break;
+ default:
+ break;
}
return (TRUE);
}
@@ -163,6 +167,8 @@ xdr_key_netstres(register XDR *xdrs, key_netstres *objp)
if (!xdr_key_netstarg(xdrs, &objp->key_netstres_u.knet))
return (FALSE);
break;
+ default:
+ break;
}
return (TRUE);
}
diff --git a/lib/libc/rpc/netname.c b/lib/libc/rpc/netname.c
index f598f78..34e9ca7 100644
--- a/lib/libc/rpc/netname.c
+++ b/lib/libc/rpc/netname.c
@@ -109,7 +109,7 @@ user2netname(netname, uid, domain)
char *dfltdom;
if (domain == NULL) {
- if (_rpc_get_default_domain(&dfltdom) != 0) {
+ if (__rpc_get_default_domain(&dfltdom) != 0) {
return (0);
}
domain = dfltdom;
@@ -135,7 +135,7 @@ host2netname(netname, host, domain)
char hostname[MAXHOSTNAMELEN+1];
if (domain == NULL) {
- if (_rpc_get_default_domain(&dfltdom) != 0) {
+ if (__rpc_get_default_domain(&dfltdom) != 0) {
return (0);
}
domain = dfltdom;
diff --git a/lib/libc/rpc/netnamer.c b/lib/libc/rpc/netnamer.c
index 36fa3dc..6384f83 100644
--- a/lib/libc/rpc/netnamer.c
+++ b/lib/libc/rpc/netnamer.c
@@ -126,7 +126,7 @@ netname2user(netname, uidp, gidp, gidlenp, gidlist)
(void) strncpy(val, val1, 1024);
val[vallen] = 0;
- err = _rpc_get_default_domain(&domain); /* change to rpc */
+ err = __rpc_get_default_domain(&domain); /* change to rpc */
if (err)
return (0);
@@ -227,7 +227,7 @@ netname2host(netname, hostname, hostlen)
(void) strncpy(hostname, val, vallen);
hostname[vallen] = 0;
- err = _rpc_get_default_domain(&domain); /* change to rpc */
+ err = __rpc_get_default_domain(&domain); /* change to rpc */
if (err)
return (0);
diff --git a/lib/libc/rpc/rpc_generic.c b/lib/libc/rpc/rpc_generic.c
index ad581a5..ee233bb 100644
--- a/lib/libc/rpc/rpc_generic.c
+++ b/lib/libc/rpc/rpc_generic.c
@@ -646,6 +646,8 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr)
#endif
struct sockaddr_un *sun;
+ port = 0;
+ sin = NULL;
addrstr = strdup(uaddr);
if (addrstr == NULL)
return NULL;
diff --git a/lib/libc/rpc/rpc_soc.c b/lib/libc/rpc/rpc_soc.c
index 39f8199..e049656 100644
--- a/lib/libc/rpc/rpc_soc.c
+++ b/lib/libc/rpc/rpc_soc.c
@@ -463,13 +463,13 @@ clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz)
u_int recvsz;
{
struct netbuf *svcaddr;
- void *localhandle;
struct netconfig *nconf;
CLIENT *cl;
int len;
- nconf = NULL;
cl = NULL;
+ nconf = NULL;
+ svcaddr = NULL;
if ((raddr->sun_len == 0) ||
((svcaddr = malloc(sizeof(struct netbuf))) == NULL ) ||
((svcaddr->buf = malloc(sizeof(struct sockaddr_un))) == NULL)) {
diff --git a/lib/libc/rpc/rpcb_prot.c b/lib/libc/rpc/rpcb_prot.c
index aa46510..20ee091 100644
--- a/lib/libc/rpc/rpcb_prot.c
+++ b/lib/libc/rpc/rpcb_prot.c
@@ -116,6 +116,7 @@ xdr_rpcblist_ptr(xdrs, rp)
rpcblist_ptr next;
rpcblist_ptr next_copy;
+ next = NULL;
for (;;) {
more_elements = (bool_t)(*rp != NULL);
if (! xdr_bool(xdrs, &more_elements)) {
@@ -204,6 +205,7 @@ xdr_rpcb_entry_list_ptr(xdrs, rp)
rpcb_entry_list_ptr next;
rpcb_entry_list_ptr next_copy;
+ next = NULL;
for (;;) {
more_elements = (bool_t)(*rp != NULL);
if (! xdr_bool(xdrs, &more_elements)) {
diff --git a/lib/libc/rpc/rpcdname.c b/lib/libc/rpc/rpcdname.c
index 03d1b85..ee6a2b4 100644
--- a/lib/libc/rpc/rpcdname.c
+++ b/lib/libc/rpc/rpcdname.c
@@ -71,7 +71,7 @@ get_default_domain()
* get rejected elsewhere in the NIS client package.
*/
int
-_rpc_get_default_domain(domain)
+__rpc_get_default_domain(domain)
char **domain;
{
if ((*domain = get_default_domain()) != 0)
diff --git a/lib/libc/rpc/svc_auth_des.c b/lib/libc/rpc/svc_auth_des.c
index 469bf65..52f4499 100644
--- a/lib/libc/rpc/svc_auth_des.c
+++ b/lib/libc/rpc/svc_auth_des.c
@@ -69,6 +69,8 @@
static const char rcsid[] = "$FreeBSD$";
#endif
+extern int key_decryptsession_pk(const char *, netobj *, des_block *);
+
#define debug(msg) printf("svcauth_des: %s\n", msg)
#define USEC_PER_SEC ((u_long) 1000000L)
diff --git a/lib/libc/rpc/svc_simple.c b/lib/libc/rpc/svc_simple.c
index 83118bc..7760039 100644
--- a/lib/libc/rpc/svc_simple.c
+++ b/lib/libc/rpc/svc_simple.c
@@ -133,7 +133,9 @@ rpc_reg(prognum, versnum, procnum, progname, inproc, outproc, nettype)
madenow = FALSE;
svcxprt = NULL;
- for (pl = proglst; pl; pl = pl->p_nxt)
+ recvsz = 0;
+ xdrbuf = netid = NULL;
+ for (pl = proglst; pl; pl = pl->p_nxt) {
if (strcmp(pl->p_netid, nconf->nc_netid) == 0) {
svcxprt = pl->p_transp;
xdrbuf = pl->p_xdrbuf;
@@ -141,6 +143,7 @@ rpc_reg(prognum, versnum, procnum, progname, inproc, outproc, nettype)
netid = pl->p_netid;
break;
}
+ }
if (svcxprt == NULL) {
struct __rpc_sockinfo si;
diff --git a/lib/libc/rpc/svc_vc.c b/lib/libc/rpc/svc_vc.c
index a9ecae1..d2a2477 100644
--- a/lib/libc/rpc/svc_vc.c
+++ b/lib/libc/rpc/svc_vc.c
@@ -129,7 +129,6 @@ svc_vc_create(fd, sendsize, recvsize)
struct __rpc_sockinfo si;
struct sockaddr_storage sslocal;
socklen_t slen;
- int one = 1;
r = mem_alloc(sizeof(*r));
if (r == NULL) {
OpenPOWER on IntegriCloud