Skip to content

lib: bluetooth: scan: Make name and address filter const#791

Merged
eivindj-nordic merged 1 commit into
nrfconnect:mainfrom
asilz:scan_const_fix
May 13, 2026
Merged

lib: bluetooth: scan: Make name and address filter const#791
eivindj-nordic merged 1 commit into
nrfconnect:mainfrom
asilz:scan_const_fix

Conversation

@asilz
Copy link
Copy Markdown
Contributor

@asilz asilz commented May 8, 2026

Currently, the name and address filter members in the ble_scan_filter_data struct are not const even though they are never modified in the scan library. I think the API should guarantee that they are not modified since I do not see a reason for why we want to modify in the library

@asilz asilz self-assigned this May 8, 2026
@asilz asilz requested a review from a team as a code owner May 8, 2026 07:34
@github-actions github-actions Bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label May 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

You can find the documentation preview for this PR here.

@asilz asilz force-pushed the scan_const_fix branch from 3381f85 to 0a20efa Compare May 8, 2026 08:04
@eivindj-nordic
Copy link
Copy Markdown
Contributor

You can add release notes here: https://github.com/nrfconnect/sdk-nrf-bm/blob/main/doc/nrf-bm/release_notes/release_notes_changelog.rst

@asilz asilz force-pushed the scan_const_fix branch from 0a20efa to 152574f Compare May 8, 2026 10:37
@asilz asilz requested a review from a team as a code owner May 8, 2026 10:37
@github-actions github-actions Bot added doc-required PR must not be merged without tech writer approval. and removed changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels May 8, 2026
@asilz asilz force-pushed the scan_const_fix branch from 152574f to 848bec9 Compare May 8, 2026 10:53
- Make name_filter in struct ble_scan_filter_data const
- Make addr_filter in struct ble_scan_filter_data const

Signed-off-by: Asil Zogby <asil.zogby@nordicsemi.no>
@asilz asilz force-pushed the scan_const_fix branch from 848bec9 to 06234b6 Compare May 8, 2026 10:54
@asilz asilz changed the title lib: bluetooth: Make name and address filter const lib: bluetooth: scan: Make name and address filter const May 8, 2026
Copy link
Copy Markdown
Contributor

@PizzaAllTheWay PizzaAllTheWay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eivindj-nordic eivindj-nordic merged commit c3ec655 into nrfconnect:main May 13, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-required PR must not be merged without tech writer approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants