Change in libosmocore[master]: vty/talloc_ctx_vty.c: use REG_NOSUB flag of regcomp()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Sat Apr 6 13:25:47 UTC 2019


Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13536


Change subject: vty/talloc_ctx_vty.c: use REG_NOSUB flag of regcomp()
......................................................................

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
---
M src/vty/talloc_ctx_vty.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/36/13536/1

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(&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;

-- 
To view, visit https://gerrit.osmocom.org/13536
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id55ffe64cc1a35dd83f61dbb0f9828aa676696f9
Gerrit-Change-Number: 13536
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190406/2e624891/attachment.htm>


More information about the gerrit-log mailing list