]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
consistency - all of the other arrays of checking-related stuff are not
authorBrian Wellington <source@isc.org>
Wed, 6 Feb 2002 06:54:31 +0000 (06:54 +0000)
committerBrian Wellington <source@isc.org>
Wed, 6 Feb 2002 06:54:31 +0000 (06:54 +0000)
null-terminated.

lib/bind9/check.c

index ee20422537523458d2b2156b08e0e653df0ea6d9..df17ae99072684c4ef07a602df11249ca660557b 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: check.c,v 1.18 2002/02/06 06:45:40 marka Exp $ */
+/* $Id: check.c,v 1.19 2002/02/06 06:54:31 bwelling Exp $ */
 
 #include <config.h>
 
@@ -517,7 +517,7 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
        isc_result_t tresult;
 
        static const char *builtin[] = { "localhost", "localnets",
-                                        "any", "none", 0 };
+                                        "any", "none"};
 
        (void)cfg_map_get(config, "options", &options);
 
@@ -592,10 +592,12 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
                     elt != NULL;
                     elt = cfg_list_next(elt)) {
                        cfg_obj_t *acl = cfg_listelt_value(elt);
-                       int i;
+                       unsigned int i;
 
                        aclname = cfg_obj_asstring(cfg_tuple_get(acl, "name"));
-                       for (i = 0; builtin[i] != NULL; i++)
+                       for (i = 0;
+                            i < sizeof(builtin) / sizeof(builtin[0]);
+                            i++)
                                if (strcasecmp(aclname, builtin[i]) == 0) {
                                        cfg_obj_log(acl, logctx, ISC_LOG_ERROR,
                                                    "attempt to redefine "