Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13137 )
Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 9: (7 comments) https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/cell_id_list.c File src/libmsc/cell_id_list.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/cell_id_list.c@35 PS9, Line 35: e->cell_id = *cid; Coverity won't be happy. Please OSMO_ASSERT(e) before referencing. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c File src/libmsc/e_link.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c@77 PS9, Line 77: *e = (struct e_link) { I think you're abusing this way of structure initialization here. All fields of 'e', excluding 'gcm', are zero-initialized, but a few lines below you (re)initialize them again. This would also suppress the compiler's -Wuninitialized warnings. Rather do 'e->gcm = gcm' below. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c@84 PS9, Line 84: memcpy If 'remote_name' were of type 'const char *', you could just use osmo_strdup(). Why do we need 'uint8_t *'? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c@84 PS9, Line 84: memcpy(e->remote_name, remote_name, remote_name_len); OSMO_ASSERT(e->remote_name) before referencing? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c@105 PS9, Line 105: enum msc_role from_role Unused parameter? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c@127 PS9, Line 127: strlen(local_msc_name) Do we need to also include '\0'? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c@132 PS9, Line 132: if (vsub) AFAIR, IMSI is mandatory for all GSUP messages. If 'vsub' is NULL, this function would prepare an incomplete GSUP message. -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 9 Gerrit-Owner: Neels Hofmeyr <[email protected]> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr <[email protected]> Gerrit-Reviewer: Vadim Yanitskiy <[email protected]> Gerrit-CC: Harald Welte <[email protected]> Gerrit-CC: Pau Espin Pedrol <[email protected]> Gerrit-Comment-Date: Tue, 07 May 2019 21:47:04 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No
