diff --git a/src/api/sockets.c b/src/api/sockets.c index cd956027..e427bd2b 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -938,7 +938,7 @@ int lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, struct timeval *timeout) { - int i; + u32_t waitres; int nready; fd_set lreadset, lwriteset, lexceptset; u32_t msectimeout; @@ -1017,7 +1017,7 @@ lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, msectimeout = 1; } - i = sys_arch_sem_wait(select_cb.sem, msectimeout); + waitres = sys_arch_sem_wait(select_cb.sem, msectimeout); /* Take us off the list */ sys_sem_wait(selectsem); @@ -1034,7 +1034,7 @@ lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, sys_sem_signal(selectsem); sys_sem_free(select_cb.sem); - if (i == SYS_ARCH_TIMEOUT) { + if (waitres == SYS_ARCH_TIMEOUT) { /* Timeout */ if (readset) FD_ZERO(readset);