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
diff --git a/src/vty/talloc_ctx_vty.c b/src/vty/talloc_ctx_vty.c
index c4d5a88..16cb763 100644
--- a/src/vty/talloc_ctx_vty.c
+++ b/src/vty/talloc_ctx_vty.c
@@ -199,7 +199,7 @@
int rc;
/* Attempt to compile a regular expression */
- rc = regcomp(¶ms.regexp, argv[2], 0);
+ rc = regcomp(¶ms.regexp, argv[2], REG_NOSUB);
if (rc) {
vty_out(vty, "Invalid expression%s", VTY_NEWLINE);
return CMD_WARNING;