aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-06-15 06:44:01 +0000
committerUlrich Drepper <drepper@redhat.com>2005-06-15 06:44:01 +0000
commit7b01092b16c2a8f3d64394ed8d984286fa970ee7 (patch)
treee626e70ad2f803445f7bb9c9ae7cf714a27ac99b
parent* hesiod/hesiod_p.h (struct hesiod_p): Add classes array. (diff)
downloadglibc-7b01092b16c2a8f3d64394ed8d984286fa970ee7.tar.gz
glibc-7b01092b16c2a8f3d64394ed8d984286fa970ee7.tar.bz2
glibc-7b01092b16c2a8f3d64394ed8d984286fa970ee7.zip
* 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.
-rw-r--r--ChangeLog6
-rw-r--r--hesiod/hesiod.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 063323b76e..ea6d2b46f7 100644
--- 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.
diff --git a/hesiod/hesiod.c b/hesiod/hesiod.c
index e0ce510866..b73aa3ce94 100644
--- a/hesiod/hesiod.c
+++ b/hesiod/hesiod.c
@@ -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;
}
}