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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Apr 11 00:24:57 UTC 2019


Harald Welte has submitted this change and it was merged. ( 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(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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: merged
Gerrit-Change-Id: Id55ffe64cc1a35dd83f61dbb0f9828aa676696f9
Gerrit-Change-Number: 13536
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190411/fb9baba1/attachment.htm>


More information about the gerrit-log mailing list