summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-17 09:31:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-17 09:31:16 (GMT)
commit0a36b1187dcef39b41d28a5ce319aa7c54f56f66 (patch)
treeebf27488f191f5ad74f527ac6c557710f5505d32 /unix/tclUnixSock.c
parentc11add7a17f78e2ec40ede65aed3e0d1485062e1 (diff)
parentbc10bf6d03a6c8685c64e36a6095e289e2b1ef33 (diff)
downloadtcl-0a36b1187dcef39b41d28a5ce319aa7c54f56f66.zip
tcl-0a36b1187dcef39b41d28a5ce319aa7c54f56f66.tar.gz
tcl-0a36b1187dcef39b41d28a5ce319aa7c54f56f66.tar.bz2
Merge 8.7
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 52f5c4e..b1e61ef 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -229,7 +229,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) {
/*
@@ -277,7 +277,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 */
@@ -542,7 +542,7 @@ TcpInputProc(
return -1;
}
bytesRead = recv(statePtr->fds.fd, buf, bufSize, 0);
- if (bytesRead > -1) {
+ if (bytesRead >= 0) {
return bytesRead;
}
if (errno == ECONNRESET) {
@@ -593,7 +593,7 @@ TcpOutputProc(
}
written = send(statePtr->fds.fd, buf, toWrite, 0);
- if (written > -1) {
+ if (written >= 0) {
return written;
}
*errorCodePtr = errno;