mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-01 20:43:47 +00:00
gsm_trx_name(): don't break if trx is NULL
Just as a general precaution deemed to fit such a convenience function that lives in libcommon, no actual failure observed. Change-Id: I8e77fe1abc402469fd037e2fde2f46e2c8114f59
This commit is contained in:
@@ -328,8 +328,11 @@ static char ts2str[255];
|
||||
|
||||
char *gsm_trx_name(const struct gsm_bts_trx *trx)
|
||||
{
|
||||
snprintf(ts2str, sizeof(ts2str), "(bts=%d,trx=%d)",
|
||||
trx->bts->nr, trx->nr);
|
||||
if (!trx)
|
||||
snprintf(ts2str, sizeof(ts2str), "(trx=NULL)");
|
||||
else
|
||||
snprintf(ts2str, sizeof(ts2str), "(bts=%d,trx=%d)",
|
||||
trx->bts->nr, trx->nr);
|
||||
|
||||
return ts2str;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user