Skip to content
Commit 3e1e2ea8 authored by Jukka Rissanen's avatar Jukka Rissanen Committed by Mahesh Mahadevan
Browse files

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: default avatarJukka Rissanen <jukka.rissanen@nordicsemi.no>
parent 0a75809a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment