summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2015-02-10 11:46:40 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2015-02-10 11:46:40 +0000
commit04d01288f87064bae00cff4f713a3dbd207b0017 (patch)
tree9edb7e9ab3c36be0946a197a56498abc742d0526 /usr.sbin
parentdff585e17ff45cc1b698ba9f6e359fe98a4cc087 (diff)
spacing
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ntpd/ntpd.c15
-rw-r--r--usr.sbin/ntpd/parse.y5
-rw-r--r--usr.sbin/ntpd/server.c8
-rw-r--r--usr.sbin/ntpd/util.c4
4 files changed, 17 insertions, 15 deletions
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c
index ef35b71936b..4d04c4b35a4 100644
--- a/usr.sbin/ntpd/ntpd.c
+++ b/usr.sbin/ntpd/ntpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntpd.c,v 1.90 2015/02/10 11:16:47 reyk Exp $ */
+/* $OpenBSD: ntpd.c,v 1.91 2015/02/10 11:46:39 reyk Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -89,7 +89,8 @@ usage(void)
extern char *__progname;
if (strcmp(__progname, "ntpctl") == 0)
- fprintf(stderr, "usage: ntpctl [-s all | peers | Sensors | status]\n");
+ fprintf(stderr,
+ "usage: ntpctl [-s all | peers | Sensors | status]\n");
else
fprintf(stderr, "usage: %s [-dnSsv] [-f file]\n",
__progname);
@@ -112,7 +113,7 @@ main(int argc, char *argv[])
extern char *__progname;
if (strcmp(__progname, "ntpctl") == 0) {
- ctl_main (argc, argv);
+ ctl_main(argc, argv);
/* NOTREACHED */
}
@@ -580,7 +581,7 @@ ctl_main(int argc, char *argv[])
break;
}
}
- if (action == -1)
+ if (action == -1)
usage();
/* NOTREACHED */
@@ -686,7 +687,7 @@ ctl_main(int argc, char *argv[])
}
close(fd);
free(ibuf_ctl);
- exit (0);
+ exit(0);
}
const char *
@@ -726,7 +727,7 @@ show_status_msg(struct imsg *imsg)
if (cstatus->constraint_median) {
tv.tv_sec = cstatus->constraint_median +
- (getmonotime() - cstatus->constraint_last);
+ (getmonotime() - cstatus->constraint_last);
tv.tv_usec = 0;
d_to_tv(gettime_from_timeval(&tv) - gettime(), &tv);
printf("constraint offset %llds", (long long)tv.tv_sec);
@@ -789,7 +790,7 @@ show_peer_msg(struct imsg *imsg, int calledfromshowall)
if (cpeer->stratum > 0)
snprintf(stratum, sizeof(stratum), "%2u", cpeer->stratum);
else
- strlcpy (stratum, " -", sizeof (stratum));
+ strlcpy(stratum, " -", sizeof (stratum));
printf("%s\n %1s %2u %2u %2s %4llds %4llds",
cpeer->peer_desc, cpeer->syncedto == 1 ? "*" : " ",
diff --git a/usr.sbin/ntpd/parse.y b/usr.sbin/ntpd/parse.y
index 49432fc33fc..01c35234454 100644
--- a/usr.sbin/ntpd/parse.y
+++ b/usr.sbin/ntpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.58 2015/02/10 06:40:08 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.59 2015/02/10 11:46:39 reyk Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -423,7 +423,8 @@ weight : WEIGHT NUMBER {
}
rtable : RTABLE NUMBER {
if ($2 < 0 || $2 > RT_TABLEID_MAX) {
- yyerror("rtable must be between 1 and RT_TABLEID_MAX");
+ yyerror("rtable must be between 1"
+ " and RT_TABLEID_MAX");
YYERROR;
}
opts.rtable = $2;
diff --git a/usr.sbin/ntpd/server.c b/usr.sbin/ntpd/server.c
index f5632468e14..af0c4b9f583 100644
--- a/usr.sbin/ntpd/server.c
+++ b/usr.sbin/ntpd/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.40 2015/01/09 07:35:37 deraadt Exp $ */
+/* $OpenBSD: server.c,v 1.41 2015/02/10 11:46:39 reyk Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -62,9 +62,9 @@ setup_listeners(struct servent *se, struct ntpd_conf *lconf, u_int *cnt)
fd = socket(AF_INET, SOCK_DGRAM, 0);
if (ioctl(fd, SIOCGIFRDOMAIN,
(caddr_t)&ifr) == -1)
- rdomain = 0;
- else
- rdomain = ifr.ifr_rdomainid;
+ rdomain = 0;
+ else
+ rdomain = ifr.ifr_rdomainid;
close(fd);
if (lap->rtable != -1 && rdomain != lap->rtable)
diff --git a/usr.sbin/ntpd/util.c b/usr.sbin/ntpd/util.c
index 79b1bb250d9..6158b80e0a4 100644
--- a/usr.sbin/ntpd/util.c
+++ b/usr.sbin/ntpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.17 2015/02/10 06:40:08 reyk Exp $ */
+/* $OpenBSD: util.c,v 1.18 2015/02/10 11:46:39 reyk Exp $ */
/*
* Copyright (c) 2004 Alexander Guy <alexander.guy@andern.org>
@@ -134,5 +134,5 @@ print_rtable(int r)
if (r > 0)
snprintf(b, sizeof(b), "rtable %d", r);
- return(b);
+ return (b);
}