path: root/openbsc/src/gprs/gb_proxy_vty.c
diff options
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-08-14 08:57:04 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-08-22 00:21:56 +0200
commit29805da6d17f367495d0d0d94098a07b01ea53e2 (patch)
treea91970b714d627a6b44b75987f4af5c62649fcff /openbsc/src/gprs/gb_proxy_vty.c
parentd2eb5e911e647cdbd78e6c004698f937e18e18a4 (diff)
gbproxy: Add gbprox_clear_patch_filter() (Coverity)
Add a separate function to clear the IMSI filter to be used instead of gbprox_set_patch_filter(cfg, NULL, ...). Albeit it fixes a Coverity issue (Unchecked return value), it is a false positive, since the return value is always 0 in these cases. Nevertheless it is more obvious what happens when an explicit clear function is called. Using NULL as filter argument of gbprox_set_patch_filter still clears the filter. Fixes: Coverity CID 1231255 Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs/gb_proxy_vty.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gb_proxy_vty.c b/openbsc/src/gprs/gb_proxy_vty.c
index ec73ae646..9574a451f 100644
--- a/openbsc/src/gprs/gb_proxy_vty.c
+++ b/openbsc/src/gprs/gb_proxy_vty.c
@@ -193,7 +193,7 @@ static int set_core_apn(struct vty *vty, const char *apn, const char *filter)
g_cfg->core_apn = NULL;
g_cfg->core_apn_size = 0;
- gbprox_set_patch_filter(g_cfg, NULL, NULL);
+ gbprox_clear_patch_filter(g_cfg);
@@ -206,7 +206,7 @@ static int set_core_apn(struct vty *vty, const char *apn, const char *filter)
if (!filter) {
- gbprox_set_patch_filter(g_cfg, NULL, NULL);
+ gbprox_clear_patch_filter(g_cfg);
} else if (gbprox_set_patch_filter(g_cfg, filter, &err_msg) != 0) {
vty_out(vty, "Match expression invalid: %s%s",
err_msg, VTY_NEWLINE);