summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Kuethe <ckuethe@cvs.openbsd.org>2007-09-14 03:07:12 +0000
committerChris Kuethe <ckuethe@cvs.openbsd.org>2007-09-14 03:07:12 +0000
commit481631885740d36758135abcb6f4eae52f7e8081 (patch)
tree6fa4c4afa55c15333141fc4659bea82a5a0127e1
parent742ad07f9afbee4ebaa97fb31a43aa772faf326f (diff)
Correctly assign a default weight of 1 to sensors and servers.
ok beck
-rw-r--r--usr.sbin/ntpd/parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/parse.y b/usr.sbin/ntpd/parse.y
index 310440cd611..83d998e6528 100644
--- a/usr.sbin/ntpd/parse.y
+++ b/usr.sbin/ntpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.33 2007/09/12 21:08:46 ckuethe Exp $ */
+/* $OpenBSD: parse.y,v 1.34 2007/09/14 03:07:11 ckuethe Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -219,7 +219,7 @@ address : STRING {
server_opts : { bzero(&opts, sizeof opts); opts.weight = 1; }
server_opts_l
{ $$ = opts; }
- | { bzero(&opts, sizeof opts); $$ = opts; }
+ | { bzero(&opts, sizeof opts); opts.weight = 1; $$ = opts; }
;
server_opts_l : server_opts_l server_opt
| server_opt
@@ -230,7 +230,7 @@ server_opt : weight
sensor_opts : { bzero(&opts, sizeof opts); opts.weight = 1; }
sensor_opts_l
{ $$ = opts; }
- | { bzero(&opts, sizeof opts); $$ = opts; }
+ | { bzero(&opts, sizeof opts); opts.weight = 1; $$ = opts; }
;
sensor_opts_l : sensor_opts_l sensor_opt
| sensor_opt