projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix -Wshorten-64-to-32 warnings.
[collectd.git]
/
src
/
libcollectdclient
/
client.c
diff --git
a/src/libcollectdclient/client.c
b/src/libcollectdclient/client.c
index
726f25d
..
eaee9c0
100644
(file)
--- a/
src/libcollectdclient/client.c
+++ b/
src/libcollectdclient/client.c
@@
-84,7
+84,7
@@
_b[sizeof (_b) - 1] = 0; \
SSTRCAT ((d), _b); \
} while (0)
_b[sizeof (_b) - 1] = 0; \
SSTRCAT ((d), _b); \
} while (0)
-
+
#define LCC_SET_ERRSTR(c, ...) do { \
snprintf ((c)->errbuf, sizeof ((c)->errbuf), __VA_ARGS__); \
#define LCC_SET_ERRSTR(c, ...) do { \
snprintf ((c)->errbuf, sizeof ((c)->errbuf), __VA_ARGS__); \
@@
-258,6
+258,7
@@
static int lcc_send (lcc_connection_t *c, const char *command) /* {{{ */
lcc_set_errno (c, errno);
return (-1);
}
lcc_set_errno (c, errno);
return (-1);
}
+ fflush(c->fh);
return (0);
} /* }}} int lcc_send */
return (0);
} /* }}} int lcc_send */
@@
-286,7
+287,7
@@
static int lcc_receive (lcc_connection_t *c, /* {{{ */
* beginning of the message. */
ptr = NULL;
errno = 0;
* beginning of the message. */
ptr = NULL;
errno = 0;
- res.status = strtol (buffer, &ptr, 0);
+ res.status =
(int)
strtol (buffer, &ptr, 0);
if ((errno != 0) || (ptr == &buffer[0]))
{
lcc_set_errno (c, errno);
if ((errno != 0) || (ptr == &buffer[0]))
{
lcc_set_errno (c, errno);
@@
-499,7
+500,6
@@
static int lcc_open_netsocket (lcc_connection_t *c, /* {{{ */
if (fd < 0)
{
status = errno;
if (fd < 0)
{
status = errno;
- fd = -1;
continue;
}
continue;
}
@@
-508,7
+508,6
@@
static int lcc_open_netsocket (lcc_connection_t *c, /* {{{ */
{
status = errno;
close (fd);
{
status = errno;
close (fd);
- fd = -1;
continue;
}
continue;
}
@@
-517,7
+516,6
@@
static int lcc_open_netsocket (lcc_connection_t *c, /* {{{ */
{
status = errno;
close (fd);
{
status = errno;
close (fd);
- fd = -1;
continue;
}
continue;
}