projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e35d2a7
)
hashtable: remove caps buffer
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Wed, 23 Jan 2019 07:17:02 +0000
(08:17 +0100)
committer
Tom Rini
<trini@konsulko.com>
Sat, 26 Jan 2019 13:13:58 +0000
(08:13 -0500)
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 <xypron.glpk@gmx.de>
lib/hashtable.c
patch
|
blob
|
history
diff --git
a/lib/hashtable.c
b/lib/hashtable.c
index 93028ed83b2677f9dd83d1f2a16abbcd9f3d2d37..50ff40a397431aac6abc5742352f6b63625f274a 100644
(file)
--- a/
lib/hashtable.c
+++ b/
lib/hashtable.c
@@
-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;