mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 04:53:24 +00:00
smpp: Checking an array for NULL will always be false
The if (submit->short_message) and if (smsc->system_id) will always be true. Fixes: Coverity CID 1042371, CID 1042372
This commit is contained in:
@@ -113,7 +113,7 @@ static int submit_to_sms(struct gsm_sms **psms, struct gsm_network *net,
|
||||
}
|
||||
sms_msg = t->value.octet;
|
||||
sms_msg_len = t->length;
|
||||
} else if (submit->short_message && submit->sm_length) {
|
||||
} else if (submit->sm_length) {
|
||||
sms_msg = submit->short_message;
|
||||
sms_msg_len = submit->sm_length;
|
||||
} else {
|
||||
|
||||
@@ -119,7 +119,7 @@ static int config_write_smpp(struct vty *vty)
|
||||
|
||||
vty_out(vty, "smpp%s", VTY_NEWLINE);
|
||||
vty_out(vty, " local-tcp-port %u%s", smsc->listen_port, VTY_NEWLINE);
|
||||
if (smsc->system_id && strlen(smsc->system_id) > 0)
|
||||
if (strlen(smsc->system_id) > 0)
|
||||
vty_out(vty, " system-id %s%s", smsc->system_id, VTY_NEWLINE);
|
||||
vty_out(vty, " policy %s%s",
|
||||
smsc->accept_all ? "accept-all" : "closed", VTY_NEWLINE);
|
||||
|
||||
Reference in New Issue
Block a user