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

zblue: fix warning and optimize #12

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Frozen935
Copy link
Contributor

Note: Please adhere to Contributing Guidelines.

Summary

fix warning and optimize.

Impact

GAP: set name/Set EIR.

Testing

CI.

bug: v/52837

Signed-off-by: fangzhenwei <[email protected]>
bug: v/52837

Fix warning: 'strncpy' specified bound 16 equals
destination size [-Wstringop-truncation]
77 | strncpy((char *)cp->pin_code, pin, sizeof(cp->pin_code));

Signed-off-by: fangzhenwei <[email protected]>
bug: v/52788

1. Move atomic_test_bit(bt_dev.flags, BT_DEV_READY)
condition from 'bt_br_write_local_name' to
'bt_set_name'.

2. Fix warning: 'strncpy' specified bound 248 equals
destination size [-Wstringop-truncation]
 1267 |         strncpy((char *)name_cp->local_name, name,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1268 |                 sizeof(name_cp->local_name));
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: fangzhenwei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant