summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordas <das>2007-09-17 11:38:14 (GMT)
committerdas <das>2007-09-17 11:38:14 (GMT)
commita7dee15a2f5e2bfc9ddc2d1bac7db2b82425aa3d (patch)
tree992f2d7a8607d531a4e145e8e5ccf8a183c72dc9 /unix
parent5019c188e504d1080f987c0391048458abef7fc9 (diff)
downloadtcl-a7dee15a2f5e2bfc9ddc2d1bac7db2b82425aa3d.zip
tcl-a7dee15a2f5e2bfc9ddc2d1bac7db2b82425aa3d.tar.gz
tcl-a7dee15a2f5e2bfc9ddc2d1bac7db2b82425aa3d.tar.bz2
coverity id 102
Diffstat (limited to 'unix')
-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);
}
/*