From 196bbc67dd193a0a78d2f9387bb15c8243a427f2 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 25 Jul 2025 19:51:42 +0200 Subject: [PATCH] os: xtrans: fix shadowed variable --- os/Xtrans.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/os/Xtrans.c b/os/Xtrans.c index 8513e4a88..d3c521044 100644 --- a/os/Xtrans.c +++ b/os/Xtrans.c @@ -595,15 +595,10 @@ int _XSERVTransSetOption (XtransConnInfo ciptr, int option, int arg) #else #if defined(WIN32) { -#ifdef WIN32 - u_long arg; -#else - int arg; -#endif - arg = 1; + u_long arg_ret = 1; /* IBM TCP/IP understands this option too well: it causes _XSERVTransRead to fail * eventually with EWOULDBLOCK */ - ret = ioctl (fd, FIONBIO, &arg); + ret = ioctl (fd, FIONBIO, &arg_ret); } #else ret = fcntl (fd, F_GETFL, 0); @@ -612,7 +607,7 @@ int _XSERVTransSetOption (XtransConnInfo ciptr, int option, int arg) #else ret = fcntl (fd, F_SETFL, ret | O_NDELAY); #endif -#endif /* AIXV3 || uniosu */ +#endif /* WIN32 */ #endif /* FIOSNBIO */ #endif /* O_NONBLOCK */ break;