aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-23 19:43:12 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-23 19:43:12 +0800
commit8d7b10ef58a4fbb2b21d0411d1f420dd69b5987c (patch)
tree599ff6e15037cae399d4b5eae51423b9e8e48dd2 /openbsc/src/nat/bsc_nat.c
parent4f140649cba52d0ccdf16d3ac8491bdf39f9643a (diff)
nat: Clang reported two places with garbage data
Initialize the variables to NULL to fix it.
Diffstat (limited to 'openbsc/src/nat/bsc_nat.c')
-rw-r--r--openbsc/src/nat/bsc_nat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index dd0f24015..826f28819 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -310,6 +310,10 @@ static void bsc_send_con_refuse(struct bsc_connection *bsc,
payload = gsm48_create_loc_upd_rej(GSM48_REJECT_PLMN_NOT_ALLOWED);
else if (con_type == NAT_CON_TYPE_CM_SERV_REQ)
payload = gsm48_create_mm_serv_rej(GSM48_REJECT_PLMN_NOT_ALLOWED);
+ else {
+ LOGP(DNAT, LOGL_ERROR, "Unknown connection type: %d\n", con_type);
+ payload = NULL;
+ }
/*
* Some BSCs do not handle the payload inside a SCCP CREF msg
@@ -379,7 +383,7 @@ send_refuse:
static int forward_sccp_to_bts(struct bsc_msc_connection *msc_con, struct msgb *msg)
{
- struct sccp_connections *con;
+ struct sccp_connections *con = NULL;
struct bsc_connection *bsc;
struct bsc_nat_parsed *parsed;
int proto;