Change in osmo-bsc[master]: gsm_data.c: use REG_NOSUB flag of regcomp()

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Apr 8 07:30:35 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13539 )

Change subject: gsm_data.c: use REG_NOSUB flag of regcomp()
......................................................................

gsm_data.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: Ia8414bf83d030adfae806c0aeaa757bc4c8cda2b
---
M src/osmo-bsc/gsm_data.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 509f805..45c433c 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -260,7 +260,7 @@
 
 	if (argc > 0) {
 		*str = talloc_strdup(ctx, argv[0]);
-		ret = regcomp(reg, argv[0], 0);
+		ret = regcomp(reg, argv[0], REG_NOSUB);
 
 		/* handle compilation failures */
 		if (ret != 0) {

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8414bf83d030adfae806c0aeaa757bc4c8cda2b
Gerrit-Change-Number: 13539
Gerrit-PatchSet: 1
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/20190408/f3d00be3/attachment.html>


More information about the gerrit-log mailing list