aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-10-07 00:50:00 +0200
committerlaforge <laforge@osmocom.org>2020-10-07 10:16:40 +0000
commitd745a0e7f3814ae47515c474386ca5358c57b252 (patch)
tree447b6fa705ce3d81cd2c8c5a14b6318efb1bb07f
parentf1fc9d3af5262402ac4bcf3da0be631fded70eae (diff)
gprs_ns2_vty_create: remove bind pointer check
The bind pointer can't be NULL because gprs_ns2_ip_bind() is either return 0 and bind is valid or != 0 and returning. Found-by: Coverity Fixes: CID#214854 Change-Id: I11d86c9cb36226701e51942f14d7a6412c3eff26
-rw-r--r--src/gb/gprs_ns2_vty.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 01eb5341..c6c4b028 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -810,17 +810,15 @@ int gprs_ns2_vty_create() {
}
nse->persistent = true;
- if (bind) {
- nsvc = gprs_ns2_ip_connect(bind,
- &sockaddr,
- nse,
- vtyvc->nsvci);
- if (!nsvc) {
- /* Could not create NSVC, connect failed */
- continue;
- }
- nsvc->persistent = true;
+ nsvc = gprs_ns2_ip_connect(bind,
+ &sockaddr,
+ nse,
+ vtyvc->nsvci);
+ if (!nsvc) {
+ /* Could not create NSVC, connect failed */
+ continue;
}
+ nsvc->persistent = true;
}