qahw_api: Fix for measure KPI latency values test app issue

- To measure KPI latency values, second fclose of fd_latency_node
  in test app causing segmentation fault.
- To fix this, remove double fclose for fd_latency_node.

Change-Id: I2b19d9f18eff7a63074aa01092afb06064f6723b
This commit is contained in:
Ramu Gottipati 2018-09-18 18:08:32 +05:30 committed by Gerrit - the friendly Code Review server
parent 019817dfe9
commit e1f65e84d3
1 changed files with 0 additions and 1 deletions

View File

@ -1228,7 +1228,6 @@ int measure_kpi_values(qahw_stream_handle_t* out_handle, bool is_offload) {
char latency_buf[200] = {0}; char latency_buf[200] = {0};
fread((void *) latency_buf, 100, 1, fd_latency_node); fread((void *) latency_buf, 100, 1, fd_latency_node);
fclose(fd_latency_node);
sscanf(latency_buf, " %llu,%llu,%*llu,%*llu,%llu,%llu", &scold, &uscold, &scont, &uscont); sscanf(latency_buf, " %llu,%llu,%*llu,%*llu,%llu,%llu", &scold, &uscold, &scont, &uscont);
tcold = scold*1000 - ((uint64_t)ts_cold.tv_sec)*1000 + uscold/1000 - ((uint64_t)ts_cold.tv_nsec)/1000000; tcold = scold*1000 - ((uint64_t)ts_cold.tv_sec)*1000 + uscold/1000 - ((uint64_t)ts_cold.tv_nsec)/1000000;
tcont = scont*1000 - ((uint64_t)ts_cont.tv_sec)*1000 + uscont/1000 - ((uint64_t)ts_cont.tv_nsec)/1000000; tcont = scont*1000 - ((uint64_t)ts_cont.tv_sec)*1000 + uscont/1000 - ((uint64_t)ts_cont.tv_nsec)/1000000;