summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-11-18 11:00:51 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-11-18 11:00:51 (GMT)
commit643e5bc24ed7dd6a21ca1a562693d0d9ce4f2651 (patch)
tree4516c29b8072de2d732fec109a391f29c7164c8a
parent53a61ed82b5e860fde78796bbea75697a65203b6 (diff)
downloadtcl-643e5bc24ed7dd6a21ca1a562693d0d9ce4f2651.zip
tcl-643e5bc24ed7dd6a21ca1a562693d0d9ce4f2651.tar.gz
tcl-643e5bc24ed7dd6a21ca1a562693d0d9ce4f2651.tar.bz2
Eliminate some redundant Tcl_GetErrno() calls.
-rw-r--r--generic/tclIOGT.c5
-rw-r--r--win/tclWinSock.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c
index bfe6a10..825f408 100644
--- a/generic/tclIOGT.c
+++ b/generic/tclIOGT.c
@@ -661,12 +661,13 @@ TransformInputProc(
* had some data before we report that instead of the request to
* re-try.
*/
+ int error = Tcl_GetErrno();
- if ((Tcl_GetErrno() == EAGAIN) && (gotBytes > 0)) {
+ if ((error == EAGAIN) && (gotBytes > 0)) {
return gotBytes;
}
- *errorCodePtr = Tcl_GetErrno();
+ *errorCodePtr = error;
return -1;
} else if (read == 0) {
/*
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 00df85f..5ac8f47 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -1317,8 +1317,9 @@ CreateSocket(
if (connect(sock, addrPtr->ai_addr, addrPtr->ai_addrlen)
== SOCKET_ERROR) {
- TclWinConvertError((DWORD) WSAGetLastError());
- if (Tcl_GetErrno() != EWOULDBLOCK) {
+ DWORD error = (DWORD) WSAGetLastError();
+ if (error != WSAEWOULDBLOCK) {
+ TclWinConvertError(error);
goto looperror;
}