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 #1856 from rubenk/snmp-dont-dispatch-values-with-empty-type-instance
[collectd.git]
/
src
/
utils_cmd_listval.c
diff --git
a/src/utils_cmd_listval.c
b/src/utils_cmd_listval.c
index
c5f71a3
..
afbd01d
100644
(file)
--- a/
src/utils_cmd_listval.c
+++ b/
src/utils_cmd_listval.c
@@
-34,8
+34,7
@@
#include "utils_parse_option.h"
#define free_everything_and_return(status) do { \
#include "utils_parse_option.h"
#define free_everything_and_return(status) do { \
- size_t j; \
- for (j = 0; j < number; j++) { \
+ for (size_t j = 0; j < number; j++) { \
sfree(names[j]); \
names[j] = NULL; \
} \
sfree(names[j]); \
names[j] = NULL; \
} \
@@
-61,7
+60,6
@@
int handle_listval (FILE *fh, char *buffer)
char **names = NULL;
cdtime_t *times = NULL;
size_t number = 0;
char **names = NULL;
cdtime_t *times = NULL;
size_t number = 0;
- size_t i;
int status;
DEBUG ("utils_cmd_listval: handle_listval (fh = %p, buffer = %s);",
int status;
DEBUG ("utils_cmd_listval: handle_listval (fh = %p, buffer = %s);",
@@
-98,7
+96,7
@@
int handle_listval (FILE *fh, char *buffer)
print_to_socket (fh, "%i Value%s found\n",
(int) number, (number == 1) ? "" : "s");
print_to_socket (fh, "%i Value%s found\n",
(int) number, (number == 1) ? "" : "s");
- for (i = 0; i < number; i++)
+ for (
size_t
i = 0; i < number; i++)
print_to_socket (fh, "%.3f %s\n", CDTIME_T_TO_DOUBLE (times[i]),
names[i]);
print_to_socket (fh, "%.3f %s\n", CDTIME_T_TO_DOUBLE (times[i]),
names[i]);