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
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 01eb534..c6c4b02 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -810,17 +810,15 @@
}
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;
}