]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* hesiod/hesiod.c (hesiod_init): Don't check for ctx->classes[0] == 0
authorUlrich Drepper <drepper@redhat.com>
Wed, 15 Jun 2005 06:44:01 +0000 (06:44 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 15 Jun 2005 06:44:01 +0000 (06:44 +0000)
or both classes equal here.
(parse_config_file): If both classes are equal, clear the second one.

ChangeLog
hesiod/hesiod.c

index 063323b76eeab3cde1ed33587a4dceb8fa1f2ae2..ea6d2b46f7c3d82caa405bc15e3f5f67473a53cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-15  Jakub Jelinek  <jakub@redhat.com>
+
+       * hesiod/hesiod.c (hesiod_init): Don't check for ctx->classes[0] == 0
+       or both classes equal here.
+       (parse_config_file): If both classes are equal, clear the second one.
+
 2005-06-08  Karl Kelley  <kekelley@iastate.edu>
 
        * hesiod/hesiod_p.h (struct hesiod_p): Add classes array.
index e0ce510866f0c4793be70177d6c1339510c57ce9..b73aa3ce94ed2edbeae7b967a60f0774e14d0f93 100644 (file)
@@ -126,7 +126,7 @@ hesiod_init(void **context) {
         * If there is no default hesiod realm set, we return an
         * error.
         */
-       if (!ctx->RHS || ctx->classes[0] == 0 || ctx->classes[0] == ctx->classes[1]) {
+       if (!ctx->RHS) {
                __set_errno(ENOEXEC);
                goto cleanup;
        }
@@ -327,7 +327,8 @@ parse_config_file(struct hesiod_p *ctx, const char *filename) {
                                   nother at all.  */
                                ctx->classes[0] = C_IN;
                                ctx->classes[1] = C_HS;
-                       } else if (n == 1)
+                       } else if (n == 1
+                                  || ctx->classes[0] == ctx->classes[1])
                                ctx->classes[1] = 0;
                }
        }