From 1dff3214e78313158a155d81fa6933a2b662c3a6 Mon Sep 17 00:00:00 2001 From: Ashish Jain Date: Tue, 10 Feb 2015 12:16:48 +0530 Subject: [PATCH] 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 --- hal/audio_extn/dolby.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hal/audio_extn/dolby.c b/hal/audio_extn/dolby.c index 0f53ad7f..a26063a3 100755 --- a/hal/audio_extn/dolby.c +++ b/hal/audio_extn/dolby.c @@ -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;