summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-03-01 15:00:45 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-03-01 15:00:45 (GMT)
commit40fac87a4b5eb36ddf12e7a72de80cedad5a6158 (patch)
tree72120a34841e7210f3229d1aa4e36026274d6bad
parent96f932d0209b23eaf5071be70dda9796f1d1ef39 (diff)
downloadtcl-40fac87a4b5eb36ddf12e7a72de80cedad5a6158.zip
tcl-40fac87a4b5eb36ddf12e7a72de80cedad5a6158.tar.gz
tcl-40fac87a4b5eb36ddf12e7a72de80cedad5a6158.tar.bz2
Make the code prettier
-rw-r--r--unix/tclUnixSock.c15
1 files 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;