From 89d498e9d8777b92375a68fbdefe51c810a3cf2e Mon Sep 17 00:00:00 2001 From: ckuethe <> Date: Fri, 14 Sep 2007 03:07:11 +0000 Subject: [PATCH] Correctly assign a default weight of 1 to sensors and servers. ok beck --- src/usr.sbin/ntpd/parse.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/usr.sbin/ntpd/parse.y b/src/usr.sbin/ntpd/parse.y index 310440cd..83d998e6 100644 --- a/src/usr.sbin/ntpd/parse.y +++ b/src/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 @@ -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