summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-06-21 11:23:23 (GMT)
committernijtmans <nijtmans>2010-06-21 11:23:23 (GMT)
commit7904f2c09aac76e42beaba3829d4e0bc702b5828 (patch)
tree42f60b267df843560dce3dc715050416409a7ed3 /unix/tclUnixSock.c
parentb959e69e2efe23f4904f8ebcb2c6638af32aeb4a (diff)
downloadtcl-7904f2c09aac76e42beaba3829d4e0bc702b5828.zip
tcl-7904f2c09aac76e42beaba3829d4e0bc702b5828.tar.gz
tcl-7904f2c09aac76e42beaba3829d4e0bc702b5828.tar.bz2
Eliminate various unnecessary type casts, use function typedefs whenever possible
Diffstat (limited to 'unix/tclUnixSock.c')
-rw-r--r--unix/tclUnixSock.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 97217ba..f5b9be4 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -5,10 +5,10 @@
*
* Copyright (c) 1995 Sun Microsystems, Inc.
*
- * See the file "license.terms" for information on usage and redistribution of
- * this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * 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.25 2010/03/01 15:00:45 dkf Exp $
+ * RCS: @(#) $Id: tclUnixSock.c,v 1.26 2010/06/21 11:23:23 nijtmans Exp $
*/
#include "tclInt.h"
@@ -799,7 +799,7 @@ TcpGetHandleProc(
{
TcpState *statePtr = (TcpState *) instanceData;
- *handlePtr = (ClientData) INT2PTR(statePtr->fd);
+ *handlePtr = INT2PTR(statePtr->fd);
return TCL_OK;
}
@@ -1143,7 +1143,7 @@ Tcl_OpenTcpClient(
sprintf(channelName, "sock%d", statePtr->fd);
statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
- (ClientData) statePtr, (TCL_READABLE | TCL_WRITABLE));
+ statePtr, (TCL_READABLE | TCL_WRITABLE));
if (Tcl_SetChannelOption(interp, statePtr->channel, "-translation",
"auto crlf") == TCL_ERROR) {
Tcl_Close(NULL, statePtr->channel);
@@ -1210,7 +1210,7 @@ TclpMakeTcpClientChannelMode(
sprintf(channelName, "sock%d", statePtr->fd);
statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
- (ClientData) statePtr, mode);
+ statePtr, mode);
if (Tcl_SetChannelOption(NULL, statePtr->channel, "-translation",
"auto crlf") == TCL_ERROR) {
Tcl_Close(NULL, statePtr->channel);
@@ -1267,10 +1267,10 @@ Tcl_OpenTcpServer(
*/
Tcl_CreateFileHandler(statePtr->fd, TCL_READABLE, TcpAccept,
- (ClientData) statePtr);
+ statePtr);
sprintf(channelName, "sock%d", statePtr->fd);
statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
- (ClientData) statePtr, 0);
+ statePtr, 0);
return statePtr->channel;
}
@@ -1327,7 +1327,7 @@ TcpAccept(
sprintf(channelName, "sock%d", newsock);
newSockState->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
- (ClientData) newSockState, (TCL_READABLE | TCL_WRITABLE));
+ newSockState, (TCL_READABLE | TCL_WRITABLE));
Tcl_SetChannelOption(NULL, newSockState->channel, "-translation",
"auto crlf");