summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-03-31 19:40:59 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-03-31 19:40:59 +0000
commit944fa9c0229522c7b79fd97638efc2346a0bf12b (patch)
treee4f8bb1ff1043203a8b0c2bed5d3276f7091e0d4 /usr.sbin
parent55698119c6396e2f048d7202573eae00b353e1c1 (diff)
Fix -Wall warnings; millert@ ok.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/timed/timed/correct.c4
-rw-r--r--usr.sbin/timed/timed/master.c5
-rw-r--r--usr.sbin/timed/timed/measure.c3
-rw-r--r--usr.sbin/timed/timed/readmsg.c4
-rw-r--r--usr.sbin/timed/timed/timed.c17
5 files changed, 18 insertions, 15 deletions
diff --git a/usr.sbin/timed/timed/correct.c b/usr.sbin/timed/timed/correct.c
index 5c6a8e2861a..03937435581 100644
--- a/usr.sbin/timed/timed/correct.c
+++ b/usr.sbin/timed/timed/correct.c
@@ -36,7 +36,7 @@ static char sccsid[] = "@(#)correct.c 5.1 (Berkeley) 5/11/93";
#endif /* not lint */
#ifdef sgi
-#ident "$Revision: 1.3 $"
+#ident "$Revision: 1.4 $"
#endif
#include "globals.h"
@@ -169,7 +169,7 @@ adjclock(struct timeval *corr)
}
} else {
syslog(LOG_WARNING,
- "clock correction %d sec too large to adjust",
+ "clock correction %ld sec too large to adjust",
adj.tv_sec);
(void) gettimeofday(&now, 0);
timeradd(&now, corr, &now);
diff --git a/usr.sbin/timed/timed/master.c b/usr.sbin/timed/timed/master.c
index a1c5615c0b8..c2e364f307a 100644
--- a/usr.sbin/timed/timed/master.c
+++ b/usr.sbin/timed/timed/master.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: master.c,v 1.4 1996/11/01 06:10:41 deraadt Exp $ */
+/* $OpenBSD: master.c,v 1.5 2001/03/31 19:40:58 fgsch Exp $ */
/*-
* Copyright (c) 1985, 1993 The Regents of the University of California.
@@ -38,7 +38,7 @@ static char sccsid[] = "@(#)master.c 5.1 (Berkeley) 5/11/93";
#endif /* not lint */
#ifdef sgi
-#ident "$Revision: 1.4 $"
+#ident "$Revision: 1.5 $"
#endif
#include "globals.h"
@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)master.c 5.1 (Berkeley) 5/11/93";
#include <sys/schedctl.h>
#include <utmpx.h> /* includes utmp.h */
#else
+#include <util.h>
#include <utmp.h>
#endif /* sgi */
diff --git a/usr.sbin/timed/timed/measure.c b/usr.sbin/timed/timed/measure.c
index 27617134c15..73acd946805 100644
--- a/usr.sbin/timed/timed/measure.c
+++ b/usr.sbin/timed/timed/measure.c
@@ -36,7 +36,7 @@ static char sccsid[] = "@(#)measure.c 5.1 (Berkeley) 5/11/93";
#endif /* not lint */
#ifdef sgi
-#ident "$Revision: 1.1 $"
+#ident "$Revision: 1.2 $"
#endif
#include "globals.h"
@@ -87,6 +87,7 @@ measure(u_long maxmsec, /* wait this many msec at most */
min_idelta = min_odelta = 0x7fffffff;
measure_status = HOSTDOWN;
measure_delta = HOSTDOWN;
+ trials = 0;
errno = 0;
/* open raw socket used to measure time differences */
diff --git a/usr.sbin/timed/timed/readmsg.c b/usr.sbin/timed/timed/readmsg.c
index 95381e7aa0a..8c320c2e137 100644
--- a/usr.sbin/timed/timed/readmsg.c
+++ b/usr.sbin/timed/timed/readmsg.c
@@ -36,7 +36,7 @@ static char sccsid[] = "@(#)readmsg.c 5.1 (Berkeley) 5/11/93";
#endif /* not lint */
#ifdef sgi
-#ident "$Revision: 1.4 $"
+#ident "$Revision: 1.5 $"
#endif
#include "globals.h"
@@ -487,7 +487,7 @@ struct sockaddr_in *addr;
break;
case TSP_ADJTIME:
- fprintf(fd, "%s %d %-6u (%ld,%ld) %-15s %s\n",
+ fprintf(fd, "%s %d %-6u (%d,%d) %-15s %s\n",
tsptype[msg->tsp_type],
msg->tsp_vers,
msg->tsp_seq,
diff --git a/usr.sbin/timed/timed/timed.c b/usr.sbin/timed/timed/timed.c
index d6ddfc6b6e0..bab84b3334a 100644
--- a/usr.sbin/timed/timed/timed.c
+++ b/usr.sbin/timed/timed/timed.c
@@ -42,7 +42,7 @@ static char sccsid[] = "@(#)timed.c 5.1 (Berkeley) 5/11/93";
#endif /* not lint */
#ifdef sgi
-#ident "$Revision: 1.7 $"
+#ident "$Revision: 1.8 $"
#endif /* sgi */
#define TSPTYPES
@@ -55,6 +55,9 @@ static char sccsid[] = "@(#)timed.c 5.1 (Berkeley) 5/11/93";
#include <math.h>
#include <sys/types.h>
#include <sys/times.h>
+#ifdef HAVENIS
+#include <netgroup.h>
+#endif /* HAVENIS */
#ifdef sgi
#include <unistd.h>
#include <sys/syssgi.h>
@@ -167,9 +170,7 @@ main(int argc, char **argv)
#endif /* HAVENIS */
#endif /* sgi */
-#ifdef lint
ntip = NULL;
-#endif
on = 1;
nflag = OFF;
@@ -477,7 +478,7 @@ main(int argc, char **argv)
if (ntohl(ntp->net.s_addr) == nt->net)
break;
}
- if (nflag && !nt || iflag && nt)
+ if ((nflag && !nt) || (iflag && nt))
continue;
ntp->next = NULL;
@@ -591,9 +592,7 @@ main(int argc, char **argv)
slave();
}
/* NOTREACHED */
-#ifdef lint
return(0);
-#endif
}
@@ -780,8 +779,8 @@ setstatus()
status &= ~IGNORE;
if (trace)
fprintf(fd,
- "\tnets=%d masters=%d slaves=%d ignored=%d delay2=%d\n",
- nnets, nmasternets, nslavenets, nignorednets, delay2);
+ "\tnets=%d masters=%d slaves=%d ignored=%d delay2=%ld\n",
+ nnets, nmasternets, nslavenets, nignorednets, delay2);
}
void
@@ -920,9 +919,11 @@ get_goodgroup(int force)
# define NG_DELAY (30*60*CLK_TCK) /* 30 minutes */
static unsigned long last_update = -NG_DELAY;
unsigned long new_update;
+#ifdef HAVENIS
struct hosttbl *htp;
struct goodhost *ghp, **ghpp;
char *mach, *usr, *dom;
+#endif
struct tms tm;