[Midnightbsd-cvs] src [10324] trunk/usr.sbin/timed/timedc: sync with freebsd
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Jun 3 15:47:48 EDT 2018
Revision: 10324
http://svnweb.midnightbsd.org/src/?rev=10324
Author: laffer1
Date: 2018-06-03 15:47:48 -0400 (Sun, 03 Jun 2018)
Log Message:
-----------
sync with freebsd
Modified Paths:
--------------
trunk/usr.sbin/timed/timedc/cmds.c
trunk/usr.sbin/timed/timedc/cmdtab.c
trunk/usr.sbin/timed/timedc/timedc.c
Modified: trunk/usr.sbin/timed/timedc/cmds.c
===================================================================
--- trunk/usr.sbin/timed/timedc/cmds.c 2018-06-03 19:47:01 UTC (rev 10323)
+++ trunk/usr.sbin/timed/timedc/cmds.c 2018-06-03 19:47:48 UTC (rev 10324)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 1985, 1993
* The Regents of the University of California. All rights reserved.
@@ -32,9 +33,8 @@
static char sccsid[] = "@(#)cmds.c 8.1 (Berkeley) 6/6/93";
#endif /* not lint */
#endif
-
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.sbin/timed/timedc/cmds.c 246209 2013-02-01 14:26:54Z charnier $");
#include "timedc.h"
#include <sys/file.h>
@@ -78,8 +78,7 @@
/* compute the difference between our date and another machine
*/
static int /* difference in days from our time */
-daydiff(hostname)
- char *hostname;
+daydiff(char *hostname)
{
int i;
int trials;
@@ -131,7 +130,7 @@
}
sec -= BU;
- (void)gettimeofday(&now, (struct timezone*)0);
+ (void)gettimeofday(&now, NULL);
return (sec - now.tv_sec);
}
}
@@ -164,9 +163,7 @@
* measurement.
*/
void
-clockdiff(argc, argv)
- int argc;
- char *argv[];
+clockdiff(int argc, char *argv[])
{
int measure_status;
extern int measure(u_long, u_long, char *, struct sockaddr_in*, int);
@@ -263,9 +260,7 @@
* finds location of master timedaemon
*/
void
-msite(argc, argv)
- int argc;
- char *argv[];
+msite(int argc, char *argv[])
{
ssize_t cc;
fd_set ready;
@@ -360,7 +355,7 @@
* quits timedc
*/
void
-quit()
+quit(void)
{
exit(0);
}
@@ -372,9 +367,7 @@
* reliability of communication channel.
*/
void
-testing(argc, argv)
- int argc;
- char *argv[];
+testing(int argc, char *argv[])
{
struct servent *srvp;
struct sockaddr_in sin;
@@ -422,9 +415,7 @@
* Enables or disables tracing on local timedaemon
*/
void
-tracing(argc, argv)
- int argc;
- char *argv[];
+tracing(int argc, char *argv[])
{
int onflag;
int length;
@@ -513,7 +504,7 @@
}
int
-priv_resources()
+priv_resources(void)
{
int port;
struct sockaddr_in sin;
Modified: trunk/usr.sbin/timed/timedc/cmdtab.c
===================================================================
--- trunk/usr.sbin/timed/timedc/cmdtab.c 2018-06-03 19:47:01 UTC (rev 10323)
+++ trunk/usr.sbin/timed/timedc/cmdtab.c 2018-06-03 19:47:48 UTC (rev 10324)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -32,7 +33,7 @@
static char sccsid[] = "@(#)cmdtab.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$MidnightBSD$";
+ "$FreeBSD: stable/10/usr.sbin/timed/timedc/cmdtab.c 216372 2010-12-11 09:38:12Z joel $";
#endif /* not lint */
#include "timedc.h"
Modified: trunk/usr.sbin/timed/timedc/timedc.c
===================================================================
--- trunk/usr.sbin/timed/timedc/timedc.c 2018-06-03 19:47:01 UTC (rev 10323)
+++ trunk/usr.sbin/timed/timedc/timedc.c 2018-06-03 19:47:48 UTC (rev 10324)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 1985, 1993
* The Regents of the University of California. All rights reserved.
@@ -38,7 +39,7 @@
static char sccsid[] = "@(#)timedc.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$MidnightBSD$";
+ "$FreeBSD: stable/10/usr.sbin/timed/timedc/timedc.c 246209 2013-02-01 14:26:54Z charnier $";
#endif /* not lint */
#include "timedc.h"
@@ -62,9 +63,7 @@
static struct cmd *getcmd(char *);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
register struct cmd *c;
@@ -105,7 +104,7 @@
printf("timedc> ");
(void) fflush(stdout);
}
- if (fgets(cmdline, sizeof(cmdline), stdin) == 0)
+ if (fgets(cmdline, sizeof(cmdline), stdin) == NULL)
quit();
if (cmdline[0] == 0)
break;
@@ -131,8 +130,7 @@
}
void
-intr(signo)
- int signo;
+intr(int signo __unused)
{
if (!fromatty)
exit(0);
@@ -141,8 +139,7 @@
static struct cmd *
-getcmd(name)
- char *name;
+getcmd(char *name)
{
register char *p, *q;
register struct cmd *c, *found;
@@ -175,7 +172,7 @@
* Slice a string up into argc/argv.
*/
void
-makeargv()
+makeargv(void)
{
register char *cp;
register char **argp = margv;
@@ -203,9 +200,7 @@
* Help command.
*/
void
-help(argc, argv)
- int argc;
- char *argv[];
+help(int argc, char *argv[])
{
register struct cmd *c;
More information about the Midnightbsd-cvs
mailing list