projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't initialize static numeric variables to 0
[collectd.git]
/
src
/
netlink.c
diff --git
a/src/netlink.c
b/src/netlink.c
index
051458f
..
0458547
100644
(file)
--- a/
src/netlink.c
+++ b/
src/netlink.c
@@
-92,12
+92,12
@@
struct qos_stats {
};
static int ir_ignorelist_invert = 1;
};
static int ir_ignorelist_invert = 1;
-static ir_ignorelist_t *ir_ignorelist_head
= NULL
;
+static ir_ignorelist_t *ir_ignorelist_head;
static struct mnl_socket *nl;
static struct mnl_socket *nl;
-static char **iflist
= NULL
;
-static size_t iflist_len
= 0
;
+static char **iflist;
+static size_t iflist_len;
static const char *config_keys[] = {"Interface", "VerboseInterface",
"QDisc", "Class",
static const char *config_keys[] = {"Interface", "VerboseInterface",
"QDisc", "Class",
@@
-449,7
+449,7
@@
static int qos_filter_cb(const struct nlmsghdr *nlh, void *args) {
const char *tc_type;
char tc_inst[DATA_MAX_NAME_LEN];
const char *tc_type;
char tc_inst[DATA_MAX_NAME_LEN];
-
_Bool stats_submitted = 0
;
+
bool stats_submitted = false
;
if (nlh->nlmsg_type == RTM_NEWQDISC)
tc_type = "qdisc";
if (nlh->nlmsg_type == RTM_NEWQDISC)
tc_type = "qdisc";
@@
-539,7
+539,7
@@
static int qos_filter_cb(const struct nlmsghdr *nlh, void *args) {
if (q_stats.bs != NULL || q_stats.qs != NULL) {
char type_instance[DATA_MAX_NAME_LEN];
if (q_stats.bs != NULL || q_stats.qs != NULL) {
char type_instance[DATA_MAX_NAME_LEN];
- stats_submitted =
1
;
+ stats_submitted =
true
;
snprintf(type_instance, sizeof(type_instance), "%s-%s", tc_type, tc_inst);
snprintf(type_instance, sizeof(type_instance), "%s-%s", tc_type, tc_inst);