thermal: 解决bug85042
Change-Id: I5156b57b14d4d5930d953aebc2936dccbc21c369
diff --git a/mbtk/liblynq_lib/src/lynq_thermal.c b/mbtk/liblynq_lib/src/lynq_thermal.c
index ed88a8b..5c755fc 100755
--- a/mbtk/liblynq_lib/src/lynq_thermal.c
+++ b/mbtk/liblynq_lib/src/lynq_thermal.c
@@ -78,7 +78,7 @@
/****************************API***************************************/
int get_thermal_zone(int *numbers, int size)
{
- if(numbers == NULL || size < 1)
+ if(numbers == NULL || size <= 6)
{
LOGE("[qser_thermal]: numbers is NULL!");
return -1;
@@ -104,10 +104,13 @@
}
qser_thermal_client_deinit();
- thermal_num = 1;
- numbers[0] = thermal;
+ numbers[thermal_num++] = thermal;
+ for(; thermal_num < size; thermal_num++)
+ {
+ numbers[thermal_num] = 0;
+ }
- return thermal_num;
+ return size;
}
/****************************API***************************************/