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
This commit is contained in:
Alexander Couzens 2020-10-07 00:50:00 +02:00 committed by laforge
parent f1fc9d3af5
commit d745a0e7f3
1 changed files with 8 additions and 10 deletions

View File

@ -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;
}