ipc: fix var declaration in for loop

"""
error: 'for' loop initial declarations are only allowed in C99 or C11 mode
"""

Change-Id: I97cb9a0a3ecf64e3e5fcfca75431f8fe2a07bd10
This commit is contained in:
Pau Espin 2020-08-25 22:19:07 +02:00 committed by pespin
parent 03334967c9
commit 2a0fb962c7
1 changed files with 2 additions and 1 deletions

View File

@ -215,6 +215,7 @@ int ipc_rx_open_req(struct ipc_sk_if_open_req *open_req)
{
/* calculate size needed */
unsigned int len;
unsigned int i;
global_dev = uhdwrap_open(open_req);
@ -232,7 +233,7 @@ int ipc_rx_open_req(struct ipc_sk_if_open_req *open_req)
* additionally go for the producer init for both, so only we are responsible for the init, instead
* of splitting it with the client and causing potential races if one side uses it too early */
decoded_region = ipc_shm_decode_region(0, (struct ipc_shm_raw_region *)shm);
for (unsigned int i = 0; i < open_req->num_chans; i++) {
for (i = 0; i < open_req->num_chans; i++) {
// ios_tx_to_device[i] = ipc_shm_init_consumer(decoded_region->channels[i]->dl_stream);
ios_tx_to_device[i] = ipc_shm_init_producer(decoded_region->channels[i]->dl_stream);
ios_rx_from_device[i] = ipc_shm_init_producer(decoded_region->channels[i]->ul_stream);