From fcccc2999adb799cc9041b1d96c02708c0b0ed0d Mon Sep 17 00:00:00 2001 From: Philippe Charnier Date: Wed, 7 Jan 1998 07:54:18 +0000 Subject: [PATCH] Remove unused #includes and make it compile again with -DDEBUG. Use syslog() instead of errx() when being a daemon. --- libexec/rpc.rusersd/rusers_proc.c | 19 +++++++++---------- libexec/rpc.rusersd/rusersd.c | 3 +-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/libexec/rpc.rusersd/rusers_proc.c b/libexec/rpc.rusersd/rusers_proc.c index c8c217c958ae..ab7fe27e8ad7 100644 --- a/libexec/rpc.rusersd/rusers_proc.c +++ b/libexec/rpc.rusersd/rusers_proc.c @@ -33,19 +33,16 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: rusers_proc.c,v 1.7 1997/11/26 07:36:50 charnier Exp $"; #endif /* not lint */ -#include -#include -#include +#ifdef DEBUG +#include +#endif #include #include #include -#include #include -#include -#include #include #include #ifdef XIDLE @@ -248,7 +245,7 @@ rusers_num() ufp = fopen(_PATH_UTMP, "r"); if (!ufp) { syslog(LOG_ERR, "%m"); - return(0); + return(NULL); } /* only entries with both name and line fields */ @@ -383,8 +380,10 @@ rusers_service(rqstp, transp) if (result != NULL && !svc_sendreply(transp, xdr_result, result)) { svcerr_systemerr(transp); } - if (!svc_freeargs(transp, xdr_argument, &argument)) - errx(1, "unable to free arguments"); + if (!svc_freeargs(transp, xdr_argument, &argument)) { + syslog(LOG_ERR, "unable to free arguments"); + exit(1); + } leave: if (from_inetd) exit(0); diff --git a/libexec/rpc.rusersd/rusersd.c b/libexec/rpc.rusersd/rusersd.c index 5cc4fafd1f9e..5d96f9eb1485 100644 --- a/libexec/rpc.rusersd/rusersd.c +++ b/libexec/rpc.rusersd/rusersd.c @@ -33,10 +33,9 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: rusersd.c,v 1.6 1997/11/26 07:36:51 charnier Exp $"; #endif /* not lint */ -#include #include #include #include