]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
eliminated needless code duplication between
authorAndreas Gustafsson <source@isc.org>
Mon, 24 Jul 2000 23:32:31 +0000 (23:32 +0000)
committerAndreas Gustafsson <source@isc.org>
Mon, 24 Jul 2000 23:32:31 +0000 (23:32 +0000)
the yea_and_nay and notify_setting grammar rules

lib/dns/config/confparser.y

index a0ed8445f9b10a90964f561aa2c508958f2c0515..b5704b6c8819a229df08b8ec4227f45c9e2cf62d 100644 (file)
@@ -16,7 +16,7 @@
  * SOFTWARE.
  */
 
-/* $Id: confparser.y,v 1.104 2000/07/24 22:59:35 explorer Exp $ */
+/* $Id: confparser.y,v 1.105 2000/07/24 23:32:31 gson Exp $ */
 
 #include <config.h>
 
@@ -1916,38 +1916,18 @@ yea_or_nay: L_YES
                }
        }
 
-notify_setting: L_YES
+notify_setting: yea_or_nay
        {
-               $$ = dns_notifytype_yes;
-       }
-       | L_TRUE
-       {
-               $$ = dns_notifytype_yes;
-       }
-       | L_NO
-       {
-               $$ = dns_notifytype_no;
-       }
-       | L_FALSE
-       {
-               $$ = dns_notifytype_no;
+               if ($1)
+                       $$ = dns_notifytype_yes;
+               else
+                       $$ = dns_notifytype_no;
+                       
        }
        | L_EXPLICIT
        {
                $$ = dns_notifytype_explicit;
        }
-       | L_INTEGER
-       {
-               if ($1 == 1) {
-                       $$ = dns_notifytype_yes;
-               } else if ($1 == 0) {
-                       $$ = dns_notifytype_no;
-               } else {
-                       parser_warning(ISC_TRUE,
-                                      "number should be 0 or 1, assuming 1");
-                       $$ = dns_notifytype_yes;
-               }
-       }
        ;
 
 check_names_type: L_MASTER