Commit c120ffb
bluetooth: shell: avoid multiple
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]>strlen calls1 parent 3f95fd4 commit c120ffb
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1769 | 1769 | | |
1770 | 1770 | | |
1771 | 1771 | | |
| 1772 | + | |
1772 | 1773 | | |
1773 | 1774 | | |
1774 | | - | |
| 1775 | + | |
1775 | 1776 | | |
1776 | 1777 | | |
1777 | 1778 | | |
1778 | 1779 | | |
1779 | 1780 | | |
1780 | 1781 | | |
1781 | | - | |
| 1782 | + | |
1782 | 1783 | | |
1783 | 1784 | | |
1784 | 1785 | | |
| |||
0 commit comments