Improve readability of code

more readable.
This commit is contained in:
David Lin
2020-02-21 13:13:29 +08:00
committed by GitHub
parent f1b698bfe7
commit 4ecbff0845

View File

@@ -53,9 +53,9 @@ static void update_events_timestamp(sEvent *pEvents, int count)
return; return;
} }
#ifdef EVENT_TIMESTAMP_USED #ifdef EVENT_TIMESTAMP_USED
pEvents[i].timestamp = time(NULL); //should be UTC and accurate pEvents[i].timestamp = time(NULL); //should be UTC and accurate
#else #else
pEvents[i].timestamp = 0; pEvents[i].timestamp = 0;
#endif #endif
} }
} }
@@ -373,8 +373,7 @@ void first_time_report_construct(DeviceProperty *pReportDataList[], int *pCount)
for (i = 0, j = 0; i < TOTAL_PROPERTY_COUNT; i++) { for (i = 0, j = 0; i < TOTAL_PROPERTY_COUNT; i++) {
pReportDataList[j++] = &(sg_DataTemplate[i].data_property); pReportDataList[j++] = &(sg_DataTemplate[i].data_property);
} }
*pCount = j; *pCount = j;
} }
///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////