Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: l2: wifi: wifi_utils: Resolve build warning with strncpy function
ARM GCC version 12.2.0 (Zephyr SDK 0.16.4) generates the following build warning from the strncpy call in "wifi_utils_parse_scan_bands": warning: '__builtin_strncpy' output truncated before terminating nul copying as many bytes from a string as its length To resolve this warning, pass the maximum length of the temporary parse_str buffer to strncpy. This also has the benefit of correctly null terminating parse_str, since we already verify the scan_bands_str is properly null terminated with the strlen() check in this function. We can therefore remove the line adding a null terminator to parse_str as well. Signed-off-by: Daniel DeGrasse <[email protected]>
- Loading branch information