1 comment:
Commit Message:
Patch Set #1, 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 change 38510. To unsubscribe, or for help writing mail filters, visit settings.