summaryrefslogtreecommitdiffstats
path: root/src/vty
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-04-06 20:17:57 +0700
committerHarald Welte <laforge@gnumonks.org>2019-04-11 00:24:55 +0000
commit3d81147dea330a93b427c8aaf461947ee470f600 (patch)
tree8516dce7414b93f456712af702396d5312b61f9a /src/vty
parentbd6968a1ca5268f6364a424df9e61e1180df2d61 (diff)
vty/talloc_ctx_vty.c: use REG_NOSUB flag of regcomp()
We don't need to know position of matches: just yes or no. This change would save some computation power. Change-Id: Id55ffe64cc1a35dd83f61dbb0f9828aa676696f9
Diffstat (limited to 'src/vty')
-rw-r--r--src/vty/talloc_ctx_vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vty/talloc_ctx_vty.c b/src/vty/talloc_ctx_vty.c
index c4d5a888..16cb7635 100644
--- a/src/vty/talloc_ctx_vty.c
+++ b/src/vty/talloc_ctx_vty.c
@@ -199,7 +199,7 @@ DEFUN(show_talloc_ctx_filter, show_talloc_ctx_filter_cmd,
int rc;
/* Attempt to compile a regular expression */
- rc = regcomp(&params.regexp, argv[2], 0);
+ rc = regcomp(&params.regexp, argv[2], REG_NOSUB);
if (rc) {
vty_out(vty, "Invalid expression%s", VTY_NEWLINE);
return CMD_WARNING;