summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/getrpcent.c
diff options
context:
space:
mode:
authorjraynard <jraynard@FreeBSD.org>1996-06-10 20:13:09 +0000
committerjraynard <jraynard@FreeBSD.org>1996-06-10 20:13:09 +0000
commit0e3efc7987c3d214da05c649e00c7f72620a96bd (patch)
tree3a4e1682ef16b142e099c2139c0dbb40e61347ee /lib/libc/rpc/getrpcent.c
parent68b3f1ce70e0dec9ed0b3454f40628b409196f2d (diff)
downloadFreeBSD-src-0e3efc7987c3d214da05c649e00c7f72620a96bd.zip
FreeBSD-src-0e3efc7987c3d214da05c649e00c7f72620a96bd.tar.gz
Code cleanup:
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. Corrected format specifier in printf(). 6. Added extra parentheses around assignment used as truth value. 7. Added missing "default" cases in switch statements. 8. Added casts for function pointers. 9. Did *not* change int declarations of uid and gid to uid_t/gid_t because I don't know if that would affect the protocol. Put in explicit casts to int instead, to make things more obvious. 10. Moved declarations of variables that are only used if YP is defined inside the '#ifdef YP' conditionals.
Diffstat (limited to 'lib/libc/rpc/getrpcent.c')
-rw-r--r--lib/libc/rpc/getrpcent.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/rpc/getrpcent.c b/lib/libc/rpc/getrpcent.c
index e9b919c..6556e61 100644
--- a/lib/libc/rpc/getrpcent.c
+++ b/lib/libc/rpc/getrpcent.c
@@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)getrpcent.c 1.14 91/03/11 Copyr 1984 Sun Micro";*/
-static char *rcsid = "$Id: getrpcent.c,v 1.2 1995/05/30 05:41:21 rgrimes Exp $";
+static char *rcsid = "$Id: getrpcent.c,v 1.3 1995/10/22 14:51:24 phk Exp $";
#endif
/*
@@ -66,6 +66,7 @@ struct rpcdata {
#ifdef YP
static int __yp_nomap = 0;
+extern int _yp_check(char **);
#endif /* YP */
static struct rpcent *interpret();
@@ -123,7 +124,7 @@ getrpcbynumber(number)
no_yp:
#endif /* YP */
setrpcent(0);
- while (p = getrpcent()) {
+ while ((p = getrpcent())) {
if (p->r_number == number)
break;
}
@@ -139,7 +140,7 @@ getrpcbyname(name)
char **rp;
setrpcent(0);
- while (rpc = getrpcent()) {
+ while ((rpc = getrpcent())) {
if (strcmp(rpc->r_name, name) == 0)
return (rpc);
for (rp = rpc->r_aliases; *rp != NULL; rp++) {
OpenPOWER on IntegriCloud