summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2021-10-07 11:32:37 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2021-10-07 11:32:37 +0000
commit0ff8fb7c70dd94ef70fcb0b81f7560859bd48956 (patch)
tree223dfc08c77a4fb7a5c0a8b82097a6622d9507c4 /usr.sbin
parentd08822dd9dff2c07656a72e2f343fc972f77db01 (diff)
Change host() error check to the more simple for of != 1.
Host() return 1 on success and 0 or -1 on failure. OK kn@ gsoares@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ldapd/parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ldapd/parse.y b/usr.sbin/ldapd/parse.y
index 54b7a3170f3..35373c8b5e5 100644
--- a/usr.sbin/ldapd/parse.y
+++ b/usr.sbin/ldapd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.40 2021/05/02 14:39:05 martijn Exp $ */
+/* $OpenBSD: parse.y,v 1.41 2021/10/07 11:32:36 claudio Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martinh@openbsd.org>
@@ -207,7 +207,7 @@ conf_main : LISTEN ON STRING port ssl certname {
if (! interface($3, cert, &conf->listeners,
$4, $5)) {
if (host($3, cert, &conf->listeners,
- $4, $5) <= 0) {
+ $4, $5) != 1) {
yyerror("invalid virtual ip or interface: %s", $3);
free($6);
free($3);