From: Douglas Bagnall Date: Wed, 3 Mar 2021 06:54:37 +0000 (+1300) Subject: ldb_match: remove redundant check X-Git-Tag: tevent-0.11.0~1606 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa93339978040eab52b2722c1716028b48d8d084;p=thirdparty%2Fsamba.git ldb_match: remove redundant check We already ensure the no-trailing-asterisk case ends at the end of the string. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14044 Signed-off-by: Douglas Bagnall Reviewed-by: Björn Jacke Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/common/ldb_match.c b/lib/ldb/common/ldb_match.c index da595615bd9..2f4d41f3441 100644 --- a/lib/ldb/common/ldb_match.c +++ b/lib/ldb/common/ldb_match.c @@ -342,8 +342,6 @@ static int ldb_wildcard_compare(struct ldb_context *ldb, TALLOC_FREE(cnk.data); } - /* last chunk may not have reached end of string */ - if ( (! tree->u.substring.end_with_wildcard) && (val.length != 0) ) goto mismatch; talloc_free(save_p); *matched = true; return LDB_SUCCESS;