mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
ASoC: aw883xx: move from strlcpy with unused retval to strscpy
Signed-off-by: Tao Huang <huangtao@rock-chips.com> Change-Id: I069ff709db267f88a6bb0c3af255837e02715349
This commit is contained in:
@@ -965,12 +965,12 @@ static int aw883xx_profile_info(struct snd_kcontrol *kcontrol,
|
||||
|
||||
prof_name = aw_dev_get_prof_name(aw883xx->aw_pa, count);
|
||||
if (prof_name == NULL) {
|
||||
strlcpy(uinfo->value.enumerated.name, "null",
|
||||
strscpy(uinfo->value.enumerated.name, "null",
|
||||
strlen("null") + 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
strlcpy(name, prof_name, sizeof(uinfo->value.enumerated.name));
|
||||
strscpy(name, prof_name, sizeof(uinfo->value.enumerated.name));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1049,7 +1049,7 @@ static int aw883xx_switch_info(struct snd_kcontrol *kcontrol,
|
||||
if (uinfo->value.enumerated.item >= count)
|
||||
uinfo->value.enumerated.item = count - 1;
|
||||
|
||||
strlcpy(uinfo->value.enumerated.name,
|
||||
strscpy(uinfo->value.enumerated.name,
|
||||
aw883xx_switch[uinfo->value.enumerated.item],
|
||||
strlen(aw883xx_switch[uinfo->value.enumerated.item]) + 1);
|
||||
|
||||
@@ -1124,7 +1124,7 @@ static int aw883xx_monitor_switch_info(struct snd_kcontrol *kcontrol,
|
||||
if (uinfo->value.enumerated.item >= count)
|
||||
uinfo->value.enumerated.item = count - 1;
|
||||
|
||||
strlcpy(uinfo->value.enumerated.name,
|
||||
strscpy(uinfo->value.enumerated.name,
|
||||
aw883xx_switch[uinfo->value.enumerated.item],
|
||||
strlen(aw883xx_switch[uinfo->value.enumerated.item]) + 1);
|
||||
|
||||
|
||||
@@ -627,7 +627,7 @@ static int aw_spin_info(struct snd_kcontrol *kcontrol,
|
||||
if (uinfo->value.enumerated.item >= count)
|
||||
uinfo->value.enumerated.item = count - 1;
|
||||
|
||||
strlcpy(uinfo->value.enumerated.name,
|
||||
strscpy(uinfo->value.enumerated.name,
|
||||
aw_spin[uinfo->value.enumerated.item],
|
||||
strlen(aw_spin[uinfo->value.enumerated.item]) + 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user