Skip to content

Commit

Permalink
* hesiod/hesiod.c (hesiod_init): Don't check for ctx->classes[0] == 0
Browse files Browse the repository at this point in the history
	or both classes equal here.
	(parse_config_file): If both classes are equal, clear the second one.
  • Loading branch information
Ulrich Drepper committed Jun 15, 2005
1 parent b399a0c commit 7b01092
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
5 changes: 3 additions & 2 deletions hesiod/hesiod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 7b01092

Please sign in to comment.