Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
---
 Xtranssock.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Xtranssock.c b/Xtranssock.c
index 268c599..775a7f9 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -1433,7 +1433,6 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char 
*host, char *port)
     char       portbuf[PORTBUFSIZE];
 #endif
 
-    long               tmpport;
     char               hostnamebuf[256];               /* tmp space */
 
     prmsg (2,"SocketINETConnect(%d,%s,%s)\n", ciptr->fd, host, port);
@@ -1457,7 +1456,7 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char 
*host, char *port)
 
     if (is_numeric (port))
     {
-       tmpport = X_TCP_PORT + strtol (port, (char**)NULL, 10);
+       long tmpport = X_TCP_PORT + strtol (port, (char**)NULL, 10);
        sprintf (portbuf, "%lu", tmpport);
        port = portbuf;
     }
@@ -1667,7 +1666,7 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char 
*host, char *port)
            }
            sockname.sin_port = htons (servp->s_port);
        } else {
-           tmpport = strtol (port, (char**)NULL, 10);
+           long tmpport = strtol (port, (char**)NULL, 10);
            if (tmpport < 1024 || tmpport > USHRT_MAX)
                return TRANS_CONNECT_FAILED;
            sockname.sin_port = htons (((unsigned short) tmpport));
-- 
1.7.3.2

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to