Commit 10f92e2f664eef070b4966ea9a58fbd1fab2c1d7

Authored by Stéphane Raimbault
1 parent 1c11970f

Move setting of option inside the relevant conditional group

Showing 1 changed file with 1 additions and 1 deletions
src/modbus-tcp.c
... ... @@ -225,7 +225,6 @@ static int _modbus_tcp_set_ipv4_options(int s)
225 225 /* If the OS does not offer SOCK_NONBLOCK, fall back to setting FIONBIO to
226 226 * make sockets non-blocking */
227 227 /* Do not care about the return value, this is optional */
228   - option = 1;
229 228 #if !defined(SOCK_NONBLOCK) && defined(FIONBIO)
230 229 #ifdef OS_WIN32
231 230 {
... ... @@ -234,6 +233,7 @@ static int _modbus_tcp_set_ipv4_options(int s)
234 233 ioctlsocket(s, FIONBIO, &loption);
235 234 }
236 235 #else
  236 + option = 1;
237 237 ioctl(s, FIONBIO, &option);
238 238 #endif
239 239 #endif
... ...