Skip to content

Commit

Permalink
hashtable: remove caps buffer
Browse files Browse the repository at this point in the history
slre_match() checks if caps == NULL. In this case it does not try to
update it. So there is no need to create a buffer caps which we do not
evaluate.

Signed-off-by: Heinrich Schuchardt <[email protected]>
  • Loading branch information
xypron authored and trini committed Jan 26, 2019
1 parent e35d2a7 commit 320194a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/hashtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,8 @@ static int match_string(int flag, const char *str, const char *pat, void *priv)
case H_MATCH_REGEX:
{
struct slre *slrep = (struct slre *)priv;
struct cap caps[slrep->num_caps + 2];

if (slre_match(slrep, str, strlen(str), caps))
if (slre_match(slrep, str, strlen(str), NULL))
return 1;
}
break;
Expand Down

0 comments on commit 320194a

Please sign in to comment.