hnbgw: use OSMO_STRLCPY_ARRAY() instead of open coding it
Change-Id: I4c539168597187408c31b906fd57844e0f165c9b
This commit is contained in:
parent
294610160d
commit
dc529f3d78
|
@ -195,10 +195,9 @@ struct ue_context *ue_context_alloc(struct hnb_context *hnb, const char *imsi,
|
|||
return NULL;
|
||||
|
||||
ue->hnb = hnb;
|
||||
if (imsi) {
|
||||
strncpy(ue->imsi, imsi, sizeof(ue->imsi));
|
||||
ue->imsi[sizeof(ue->imsi)-1] = '\0';
|
||||
} else
|
||||
if (imsi)
|
||||
OSMO_STRLCPY_ARRAY(ue->imsi, imsi);
|
||||
else
|
||||
ue->imsi[0] = '\0';
|
||||
ue->tmsi = tmsi;
|
||||
ue->context_id = get_next_ue_ctx_id(hnb->gw);
|
||||
|
|
Loading…
Reference in New Issue