Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bluetooth: shell: avoid multiple strlen calls #81095

Commits on Nov 8, 2024

  1. bluetooth: shell: avoid multiple strlen calls

    Add `len` to store the result of `strlen(addr_arg)` to avoid
    multiple calls to `strlen` within the `for-loop` in
    `cmd_scan_filter_set_addr`.
    While the performance impact may be minimal in a shell context,
    storing `strlen(addr_arg)` in `len` ensures a single call,
    making the code more predictable and consistent.
    
    Signed-off-by: Pisit Sawangvonganan <[email protected]>
    ndrs-pst committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    da9ab10 View commit details
    Browse the repository at this point in the history