Browse Source

spacing

OPENBSD_5_7
reyk 10 years ago
parent
commit
2a9806d4a4
4 changed files with 17 additions and 15 deletions
  1. +8
    -7
      src/usr.sbin/ntpd/ntpd.c
  2. +3
    -2
      src/usr.sbin/ntpd/parse.y
  3. +4
    -4
      src/usr.sbin/ntpd/server.c
  4. +2
    -2
      src/usr.sbin/ntpd/util.c

+ 8
- 7
src/usr.sbin/ntpd/ntpd.c View File

@ -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 ? "*" : " ",


+ 3
- 2
src/usr.sbin/ntpd/parse.y View File

@ -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;


+ 4
- 4
src/usr.sbin/ntpd/server.c View File

@ -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)


+ 2
- 2
src/usr.sbin/ntpd/util.c View File

@ -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);
}

Loading…
Cancel
Save