Skip to content

Commit

Permalink
ldb_match: remove redundant check
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Björn Jacke <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
douglasbagnall authored and abartlet committed Mar 10, 2021
1 parent 33a95a1 commit fa93339
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/ldb/common/ldb_match.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fa93339

Please sign in to comment.