Commit 3e1e2ea
net: wifi: mgmt: Use memcpy instead of strncpy
Using strncpy gives this warning
warning: 'strncpy' output may be truncated copying 32 bytes from
a string of length 32 [-Wstringop-truncation]
strncpy(roaming_params.neighbor_rep.neighbor_ap[idx].bssid_info,
bssid_info,
sizeof(roaming_params.neighbor_rep.neighbor_ap->bssid_info));
There is '\0' at the end of the allocated buffer so we can safely
use memcpy() here to avoid any warnings.
Signed-off-by: Jukka Rissanen <[email protected]>1 parent 0a75809 commit 3e1e2ea
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | | - | |
539 | | - | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
540 | 541 | | |
541 | 542 | | |
542 | 543 | | |
543 | | - | |
544 | | - | |
545 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
546 | 547 | | |
547 | 548 | | |
548 | 549 | | |
| |||
0 commit comments