projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
network plugin: unsigned variables can't be negative
[collectd.git]
/
src
/
ted.c
diff --git
a/src/ted.c
b/src/ted.c
index
5dd75bc
..
186cf2b
100644
(file)
--- a/
src/ted.c
+++ b/
src/ted.c
@@
-70,7
+70,7
@@
static int ted_read_value(double *ret_power, double *ret_voltage)
{
unsigned char receive_buffer[300];
unsigned char package_buffer[300];
{
unsigned char receive_buffer[300];
unsigned char package_buffer[300];
- char pkt_request[1] = {0xAA};
+
unsigned
char pkt_request[1] = {0xAA};
int package_buffer_pos;
fd_set input;
int package_buffer_pos;
fd_set input;
@@
-147,7
+147,7
@@
static int ted_read_value(double *ret_power, double *ret_voltage)
WARNING ("ted plugin: Received EOF from file descriptor.");
return (-1);
}
WARNING ("ted plugin: Received EOF from file descriptor.");
return (-1);
}
- else if (
receive_buffer_length
> sizeof (receive_buffer))
+ else if (
((size_t) receive_buffer_length)
> sizeof (receive_buffer))
{
ERROR ("ted plugin: read(2) returned invalid value %zi.",
receive_buffer_length);
{
ERROR ("ted plugin: read(2) returned invalid value %zi.",
receive_buffer_length);
@@
-263,7
+263,7
@@
static int ted_open_device (void)
return (0);
} /* int ted_open_device */
return (0);
} /* int ted_open_device */
-static void ted_submit (char *type, double value)
+static void ted_submit (c
onst c
har *type, double value)
{
value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
{
value_t values[1];
value_list_t vl = VALUE_LIST_INIT;