hal: Update atoi usage to atoll in case of large Numeric values

-DMID can have value greater than the MAX value returned by atoi,
hence use atoll instead.
- This change is done to accommodate the change in atoi implementation
from Lolipop onwards.

Change-Id: I58b1ba4ff18642238eaa34f41dd4bd9eeb1a25a9
This commit is contained in:
Ashish Jain 2015-02-10 12:16:48 +05:30
parent de982ca5d5
commit 1dff3214e7
1 changed files with 2 additions and 2 deletions

View File

@ -575,7 +575,7 @@ void audio_extn_dolby_set_dmid(struct audio_device *adev)
return;
property_get("dmid",c_dmid,"0");
i_dmid = atoi(c_dmid);
i_dmid = atoll(c_dmid);
ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
if (!ctl) {
@ -762,7 +762,7 @@ void audio_extn_dolby_set_license(struct audio_device *adev)
i_key = 0;
#endif
property_get("dmid",c_dmid,"0");
i_dmid = atoi(c_dmid);
i_dmid = atoll(c_dmid);
ALOGV("%s Setting DS1 License, key:0x%x dmid %d",__func__, i_key,i_dmid);
dolby_license.dmid = i_dmid;
dolby_license.license_key = i_key;