From fec950e474e5f7a177353db7b13f5818875741dd Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 12 Aug 1999 20:18:50 +0000 Subject: fix things that Irix n32 cc warns about, possibly including the bug that makes zstat randomly dump core some times --- clients/zstat/zstat.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'clients') diff --git a/clients/zstat/zstat.c b/clients/zstat/zstat.c index f378771..0c034f9 100644 --- a/clients/zstat/zstat.c +++ b/clients/zstat/zstat.c @@ -44,14 +44,16 @@ const char *srv_head[] = { int outoftime = 0; +int serveronly = 0,hmonly = 0; +u_short srv_port; + +void usage(), do_stat(); + RETSIGTYPE timeout() { outoftime = 1; } -int serveronly = 0,hmonly = 0; -u_short srv_port; - main(argc, argv) int argc; char *argv[]; @@ -111,6 +113,7 @@ main(argc, argv) exit(0); } +void do_stat(host) char *host; { @@ -128,6 +131,7 @@ do_stat(host) (void) srv_stat(srv_host); } +int hm_stat(host,server) char *host,*server; { @@ -135,7 +139,7 @@ hm_stat(host,server) Code_t code; char *line[20],*mp; - int sock,i,nf,ret; + int i,nf; struct hostent *hp; time_t runtime; struct tm *tim; @@ -157,7 +161,7 @@ hm_stat(host,server) } if ((code = ZhmStat(&inaddr, ¬ice)) != ZERR_NONE) { - com_err("zstat", ret, "getting hostmanager status"); + com_err("zstat", code, "getting hostmanager status"); exit(-1); } @@ -187,11 +191,11 @@ hm_stat(host,server) printf("\n"); - (void) close(sock); ZFreeNotice(¬ice); return(0); } +int srv_stat(host) char *host; { @@ -303,6 +307,7 @@ srv_stat(host) return(0); } +void usage(s) char *s; { -- cgit v1.2.3