summaryrefslogtreecommitdiffstats
path: root/src/H5FDstream.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-10-16 22:53:56 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-10-16 22:53:56 (GMT)
commit84bf19bec42e2c53114727df2e239aa3fecb1071 (patch)
treea16377205eda598abfc6d37b2a68113dd8060816 /src/H5FDstream.c
parent775bd09974b4681672bce3c1a10948bad5d482da (diff)
downloadhdf5-84bf19bec42e2c53114727df2e239aa3fecb1071.zip
hdf5-84bf19bec42e2c53114727df2e239aa3fecb1071.tar.gz
hdf5-84bf19bec42e2c53114727df2e239aa3fecb1071.tar.bz2
[svn-r12767] Description:
Code cleanup to improve formatting & reduce compiler warnings. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5FDstream.c')
-rw-r--r--src/H5FDstream.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5FDstream.c b/src/H5FDstream.c
index 7c53b0a..70ce836 100644
--- a/src/H5FDstream.c
+++ b/src/H5FDstream.c
@@ -486,18 +486,18 @@ H5FD_stream_open_socket (const char *filename, int o_flags,
fprintf (stderr, "Stream VFD: connecting to host '%s' port %d\n",
hostname, fapl->port);
#endif
- if (connect (sock, (struct sockaddr *) &server, sizeof (server)) < 0)
+ if (connect (sock, (struct sockaddr *) &server, (socklen_t)sizeof (server)) < 0)
HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to connect")
}
else {
server.sin_addr.s_addr = INADDR_ANY;
- if (H5FD_STREAM_IOCTL_SOCKET (sock, FIONBIO, &on) < 0) {
+ if (H5FD_STREAM_IOCTL_SOCKET (sock, (int)FIONBIO, &on) < 0) {
HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to set non-blocking mode for socket")
} else if (setsockopt (sock, IPPROTO_TCP, TCP_NODELAY, (const char *) &on,
- sizeof(on)) < 0) {
+ (socklen_t)sizeof(on)) < 0) {
HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to set socket option TCP_NODELAY")
} else if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, (const char *) &on,
- sizeof(on)) < 0) {
+ (socklen_t)sizeof(on)) < 0) {
HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to set socket option SO_REUSEADDR")
} else {
/* Try to bind the socket to the given port.
@@ -775,7 +775,7 @@ H5FD_stream_flush (H5FD_t *_stream, hid_t UNUSED dxpl_id, unsigned UNUSED closin
fromlen = sizeof (from);
while (! H5FD_STREAM_ERROR_CHECK (sock = accept (stream->socket,
&from, &fromlen))) {
- if (H5FD_STREAM_IOCTL_SOCKET (sock, FIONBIO, &on) < 0) {
+ if (H5FD_STREAM_IOCTL_SOCKET (sock, (int)FIONBIO, &on) < 0) {
H5FD_STREAM_CLOSE_SOCKET (sock);
continue; /* continue the loop for other clients to connect */
}