fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-msc/+/38510?usp=email )
Change subject: csd_bs: cosmetic changes to csd_bs_list_to_bearer_cap() ...................................................................... Patch Set 1: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-msc/+/38510/comment/9f26c164_6a681744?usp=email : PS1, Line 7: csd_bs: cosmetic changes to csd_bs_list_to_bearer_cap() > Allocating a var in the stack every loop iteration This is incorrect, because a loop does not have its own stack frame, only functions do. This simply reduces the usage scope of a variable, in theory allowing the compiler to optimize code better. The resulting binary may or may not change, depending on the compiler and the `-O` level. > Marking the variable as const So that the compiler can avoid allocating stack memory for it and access `list->bs[i]` directly. By "the way this function behaves though" I meant the output it produces given the same input. Again, we can keep discussing this forever, but the core logic of this function remains unchanged. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38510?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I101f55dfbd0d327269fcce76031a2db265ca2eb9 Gerrit-Change-Number: 38510 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <[email protected]> Gerrit-Reviewer: laforge <[email protected]> Gerrit-Reviewer: pespin <[email protected]> Gerrit-Comment-Date: Fri, 25 Oct 2024 13:38:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <[email protected]> Comment-In-Reply-To: fixeria <[email protected]>
