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
This commit is contained in:
Vadim Yanitskiy 2019-04-06 20:17:57 +07:00 committed by Harald Welte
parent bd6968a1ca
commit 3d81147dea
1 changed files with 1 additions and 1 deletions

View File

@ -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;