projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1455 from rubenk/configure-ac-remove-dead-code
[collectd.git]
/
src
/
collectdctl.c
diff --git
a/src/collectdctl.c
b/src/collectdctl.c
index
8357ce8
..
febc998
100644
(file)
--- a/
src/collectdctl.c
+++ b/
src/collectdctl.c
@@
-120,7
+120,7
@@
static int count_chars (const char *str, char chr) {
return count;
} /* count_chars */
return count;
} /* count_chars */
-static int array_grow (void **array,
in
t *array_len, size_t elem_size)
+static int array_grow (void **array,
size_
t *array_len, size_t elem_size)
{
void *tmp;
{
void *tmp;
@@
-229,10
+229,10
@@
static int flush (lcc_connection_t *c, int argc, char **argv)
int timeout = -1;
lcc_identifier_t *identifiers = NULL;
int timeout = -1;
lcc_identifier_t *identifiers = NULL;
-
in
t identifiers_num = 0;
+
size_
t identifiers_num = 0;
char **plugins = NULL;
char **plugins = NULL;
-
in
t plugins_num = 0;
+
size_
t plugins_num = 0;
int status;
int i;
int status;
int i;
@@
-507,7
+507,7
@@
static int putval (lcc_connection_t *c, int argc, char **argv)
values_types[values_len] = LCC_TYPE_GAUGE;
}
else { /* integer */
values_types[values_len] = LCC_TYPE_GAUGE;
}
else { /* integer */
- values[values_len].counter =
strto
l (value, &endptr, 0);
+ values[values_len].counter =
(counter_t) strtoul
l (value, &endptr, 0);
values_types[values_len] = LCC_TYPE_COUNTER;
}
++values_len;
values_types[values_len] = LCC_TYPE_COUNTER;
}
++values_len;
@@
-551,14
+551,14
@@
int main (int argc, char **argv) {
int status;
while (42) {
int status;
while (42) {
- int
c
;
+ int
opt
;
-
c
= getopt (argc, argv, "s:h");
+
opt
= getopt (argc, argv, "s:h");
- if (
c
== -1)
+ if (
opt
== -1)
break;
break;
- switch (
c
) {
+ switch (
opt
) {
case 's':
snprintf (address, sizeof (address), "unix:%s", optarg);
address[sizeof (address) - 1] = '\0';
case 's':
snprintf (address, sizeof (address), "unix:%s", optarg);
address[sizeof (address) - 1] = '\0';