summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-17 09:27:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-17 09:27:44 (GMT)
commitbc10bf6d03a6c8685c64e36a6095e289e2b1ef33 (patch)
treed560f690b9bdd6294623904e6273d37b937a872e /unix/tclUnixSock.c
parent32975bd346263a3ab1f6bcf46adadfdddd3ffe03 (diff)
parente14285c3a1d7dd2d7407fda5a5c841ccb5cae488 (diff)
downloadtcl-bc10bf6d03a6c8685c64e36a6095e289e2b1ef33.zip
tcl-bc10bf6d03a6c8685c64e36a6095e289e2b1ef33.tar.gz
tcl-bc10bf6d03a6c8685c64e36a6095e289e2b1ef33.tar.bz2
Change version number of http package from 2.9.5 -> 2.10.0a1, since it's different from the 2.9.5 version in Tcl 8.6.x.
Use "$idx >= 0" check in stead of "$idx > -1" everywhere.
Diffstat (limited to 'unix/tclUnixSock.c')
-rw-r--r--unix/tclUnixSock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index cb20166..8c9386c 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -233,7 +233,7 @@ InitializeHostName(
struct hostent *hp;
memset(&u, (int) 0, sizeof(struct utsname));
- if (uname(&u) > -1) { /* INTL: Native. */
+ if (uname(&u) >= 0) { /* INTL: Native. */
hp = TclpGetHostByName(u.nodename); /* INTL: Native. */
if (hp == NULL) {
/*
@@ -281,7 +281,7 @@ InitializeHostName(
char buffer[256];
# endif
- if (gethostname(buffer, sizeof(buffer)) > -1) { /* INTL: Native. */
+ if (gethostname(buffer, sizeof(buffer)) >= 0) { /* INTL: Native. */
native = buffer;
}
#endif /* NO_UNAME */
@@ -545,7 +545,7 @@ TcpInputProc(
return -1;
}
bytesRead = recv(statePtr->fds.fd, buf, (size_t) bufSize, 0);
- if (bytesRead > -1) {
+ if (bytesRead >= 0) {
return bytesRead;
}
if (errno == ECONNRESET) {
@@ -596,7 +596,7 @@ TcpOutputProc(
}
written = send(statePtr->fds.fd, buf, (size_t) toWrite, 0);
- if (written > -1) {
+ if (written >= 0) {
return written;
}
*errorCodePtr = errno;