Fix platform_get_snd_device_name_extn functions.
This was showing up as a const cast, but those lines were completely
wrong. C does not work that way. Replace them with a strlcpy which
appears to be what was intended.
Note this removes a device_name NULL check. Looking through callers, no
one ever passes in NULL, and no other platform_get_snd_device_name_extn
implementation ever checks for it.
Test: Still compiles. Device boots.
Change-Id: I5d71550f8f3891aacdf8d8aa95c3cd6094aa4701
diff --git a/hal/msm8960/platform.c b/hal/msm8960/platform.c
index d7fc84c..93ba1fd 100644
--- a/hal/msm8960/platform.c
+++ b/hal/msm8960/platform.c
@@ -1092,7 +1092,8 @@
snd_device_t snd_device,
char *device_name)
{
- device_name = platform_get_snd_device_name(snd_device);
+ strlcpy(device_name, platform_get_snd_device_name(snd_device),
+ DEVICE_NAME_MAX_SIZE);
return 0;
}