summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unix/tclUnixChan.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 34f85fb..15629a2 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixChan.c,v 1.81 2007/07/31 08:23:07 dkf Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.82 2007/09/17 11:38:14 das Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -2633,11 +2633,7 @@ CreateSocketAddress(
Tcl_DString ds;
const char *native;
- if (host == NULL) {
- native = NULL;
- } else {
- native = Tcl_UtfToExternalDString(NULL, host, -1, &ds);
- }
+ native = Tcl_UtfToExternalDString(NULL, host, -1, &ds);
addr.s_addr = inet_addr(native); /* INTL: Native. */
/*
@@ -2655,18 +2651,13 @@ CreateSocketAddress(
errno = ENXIO;
#endif /* ENXIO */
#endif /* EHOSTUNREACH */
- if (native != NULL) {
- Tcl_DStringFree(&ds);
- }
+ Tcl_DStringFree(&ds);
return 0; /* Error. */
}
-
memcpy(&addr, (void *) hostent->h_addr_list[0],
(size_t) hostent->h_length);
}
- if (native != NULL) {
- Tcl_DStringFree(&ds);
- }
+ Tcl_DStringFree(&ds);
}
/*