mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
techpack: audio: Fix false positive -Wstrlcpy-strlcat-size
strlen(swr_dmic_name_prefix_of) + 1 bytes are allocated for prefix_name just above
techpack/audio/asoc/codecs/swr-dmic.c:685:11: error: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Werror,-Wstrlcpy-strlcat-size]
strlen(swr_dmic_name_prefix_of) + 1);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Change-Id: I808b4f135d42fc50587eeb9348848f7e0a3561cc
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
This commit is contained in:
parent
4f5bf3d147
commit
8f2a69d5a3
1 changed files with 1 additions and 2 deletions
|
|
@ -681,8 +681,7 @@ static int swr_dmic_probe(struct swr_device *pdev)
|
|||
ret = -ENOMEM;
|
||||
goto dev_err;
|
||||
}
|
||||
strlcpy(prefix_name, swr_dmic_name_prefix_of,
|
||||
strlen(swr_dmic_name_prefix_of) + 1);
|
||||
strlcpy(prefix_name, swr_dmic_name_prefix_of, sizeof(prefix_name));
|
||||
component->name_prefix = prefix_name;
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue