diff options
author | jraynard <jraynard@FreeBSD.org> | 1996-06-10 00:49:19 +0000 |
---|---|---|
committer | jraynard <jraynard@FreeBSD.org> | 1996-06-10 00:49:19 +0000 |
commit | 27f0bdfba4e8fc628b5a1afaf7e39455291b37de (patch) | |
tree | fb98f790b5ece8c1c87c646b39f28df9c086361a /lib/libc/rpc/svc_run.c | |
parent | a9d801afa6c4bbde4a0661b767edfda1fd5abd8d (diff) | |
download | FreeBSD-src-27f0bdfba4e8fc628b5a1afaf7e39455291b37de.zip FreeBSD-src-27f0bdfba4e8fc628b5a1afaf7e39455291b37de.tar.gz |
Code cleanup (part two):
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 casts in select() args.
6. Got rid of more "extern int errno" rubbish.
7. Added extra parentheses around assignment used as truth value.
8. Fixed bug in clnt_{tcp, udp}create() where pointers could be free'd
even if they hadn't been successfully malloc()'d.
Diffstat (limited to 'lib/libc/rpc/svc_run.c')
-rw-r--r-- | lib/libc/rpc/svc_run.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/libc/rpc/svc_run.c b/lib/libc/rpc/svc_run.c index 730acd3..5c84864 100644 --- a/lib/libc/rpc/svc_run.c +++ b/lib/libc/rpc/svc_run.c @@ -30,7 +30,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";*/ /*static char *sccsid = "from: @(#)svc_run.c 2.1 88/07/29 4.0 RPCSRC";*/ -static char *rcsid = "$Id: svc_run.c,v 1.1 1994/08/07 18:36:09 wollman Exp $"; +static char *rcsid = "$Id: svc_run.c,v 1.2 1995/05/30 05:41:35 rgrimes Exp $"; #endif /* @@ -38,7 +38,13 @@ static char *rcsid = "$Id: svc_run.c,v 1.1 1994/08/07 18:36:09 wollman Exp $"; * Wait for input, call server program. */ #include <rpc/rpc.h> +#include <stdio.h> #include <sys/errno.h> +#include <sys/types.h> +#include <sys/time.h> +#include <unistd.h> + +int _rpc_dtablesize(void); void svc_run() @@ -48,7 +54,6 @@ svc_run() #else int readfds; #endif /* def FD_SETSIZE */ - extern int errno; for (;;) { #ifdef FD_SETSIZE @@ -56,7 +61,7 @@ svc_run() #else readfds = svc_fds; #endif /* def FD_SETSIZE */ - switch (select(_rpc_dtablesize(), &readfds, (int *)0, (int *)0, + switch (select(_rpc_dtablesize(), &readfds, NULL, NULL, (struct timeval *)0)) { case -1: if (errno == EINTR) { |