From af5fcce9e1d9fb7eb35f51db732944f8d02c7b30 Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 7 Oct 2021 11:32:36 +0000 Subject: [PATCH] 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@ --- usr.sbin/ldapd/parse.y | 4 ++-- 1 file 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 @@ -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); -- 2.20.1