From 40fac87a4b5eb36ddf12e7a72de80cedad5a6158 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 1 Mar 2010 15:00:45 +0000 Subject: Make the code prettier --- unix/tclUnixSock.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 8169357..97217ba 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixSock.c,v 1.24 2010/03/01 14:57:47 ferrieux Exp $ + * RCS: @(#) $Id: tclUnixSock.c,v 1.25 2010/03/01 15:00:45 dkf Exp $ */ #include "tclInt.h" @@ -686,11 +686,16 @@ TcpGetOptionProc( } Tcl_DStringAppendElement(dsPtr, inet_ntoa(sockname.sin_addr)); if (sockname.sin_addr.s_addr == INADDR_ANY) { - hostEntPtr = NULL; /* we don't want to resolve INADDR_ANY */ + /* + * We don't want to resolve INADDR_ANY; it can sometimes cause + * problems (and never has a name). + */ + + hostEntPtr = NULL; } else { - hostEntPtr = TclpGetHostByAddr( /* INTL: Native. */ - (char *) &sockname.sin_addr, - sizeof(sockname.sin_addr), AF_INET); + hostEntPtr = TclpGetHostByAddr( /* INTL: Native. */ + (char *) &sockname.sin_addr, + sizeof(sockname.sin_addr), AF_INET); } if (hostEntPtr != NULL) { Tcl_DString ds; -- cgit v0.12