Attention is currently required from: fixeria, matanp. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32565 )
Change subject: ctrl: Add getting neighbor list ...................................................................... Patch Set 3: (1 comment) File src/osmo-bsc/bts_ctrl.c: https://gerrit.osmocom.org/c/osmo-bsc/+/32565/comment/5474134d_d2f1b046 PS3, Line 531: cmd->reply = talloc_asprintf_append(cmd->reply, i == 0 ? "%u" : " %u", i); there's several things I'm not liking here: 1- I'd better go for a non-whitespace separator. I think we use comma "," as a separator in other lists 2- AFAIU you are allocating a new string on each iteration, ie. for each neighbor. I'd fancy much more a better approach, such as allocating buffers incrementing size *2 when it becomes full. At least, free the previous string before allocating new one so you don't end up with 200 allocated strings. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32565 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icba0b7d92f4c67e617d707ca651d674f0d1ba8a7 Gerrit-Change-Number: 32565 Gerrit-PatchSet: 3 Gerrit-Owner: matanp <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <[email protected]> Gerrit-CC: fixeria <[email protected]> Gerrit-CC: pespin <[email protected]> Gerrit-Attention: fixeria <[email protected]> Gerrit-Attention: matanp <[email protected]> Gerrit-Comment-Date: Mon, 15 May 2023 11:16:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
