aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-04-07 00:34:19 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-04-07 00:34:23 +0700
commite6ab8c1bc72f24aff7bdbc453db4831da35c39c0 (patch)
treea8ce92bbff2913705679f49fee32c6a4e4942dd3
parentac88f5a5c9922328c685b6879c02c4834039be85 (diff)
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
-rw-r--r--src/osmo-bsc/gsm_data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 509f805ae..45c433ced 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -260,7 +260,7 @@ int gsm_parse_reg(void *ctx, regex_t *reg, char **str, int argc, const char **ar
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) {