summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9e98d6)
raw | patch | inline | side by side (parent: a9e98d6)
author | Denys Fedoryshchenko <nuclearcat@nuclearcat.com> | |
Tue, 29 Nov 2016 00:24:56 +0000 (00:24 +0000) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 17 Dec 2016 09:27:37 +0000 (10:27 +0100) |
src/netlink.c | patch | blob | history |
diff --git a/src/netlink.c b/src/netlink.c
index 6646a549c18aa3a01b0a52ebb9e79396878fe370..305167a5bff7059ee85092926092a4c30e13fa7b 100644 (file)
--- a/src/netlink.c
+++ b/src/netlink.c
} ir_ignorelist_t;
struct qos_stats {
- struct gnet_stats_basic **bs;
- struct gnet_stats_queue **qs;
+ struct gnet_stats_basic *bs;
+ struct gnet_stats_queue *qs;
};
static int ir_ignorelist_invert = 1;
#if HAVE_TCA_STATS2
static int qos_attr_cb(const struct nlattr *attr, void *data) {
struct qos_stats *qdisc = (struct qos_stats *)data;
- struct gnet_stats_basic **bs = qdisc->bs;
- struct gnet_stats_queue **qs = qdisc->qs;
+ struct gnet_stats_basic *bs = qdisc->bs;
+ struct gnet_stats_queue *qs = qdisc->qs;
/* skip unsupported attribute in user-space */
if (mnl_attr_type_valid(attr, TCA_STATS_MAX) < 0)
return MNL_CB_OK;
if (mnl_attr_get_type(attr) == TCA_STATS_BASIC) {
- if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(**bs)) < 0) {
+ if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(*bs)) < 0) {
ERROR("netlink plugin: qos_attr_cb: TCA_STATS_BASIC mnl_attr_validate2 "
"failed.");
return MNL_CB_ERROR;
}
- *bs = mnl_attr_get_payload(attr);
+ bs = mnl_attr_get_payload(attr);
return MNL_CB_OK;
}
if (mnl_attr_get_type(attr) == TCA_STATS_QUEUE) {
- if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(**qs)) < 0) {
+ if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(*qs)) < 0) {
ERROR("netlink plugin: qos_attr_cb: TCA_STATS_QUEUE mnl_attr_validate2 "
"failed.");
return MNL_CB_ERROR;
}
- *qs = mnl_attr_get_payload(attr);
+ qs = mnl_attr_get_payload(attr);
return MNL_CB_OK;
}
struct gnet_stats_basic *bs = NULL;
struct gnet_stats_queue *qs = NULL;
struct qos_stats q_stats;
- q_stats.bs = &bs;
- q_stats.qs = &qs;
+ q_stats.bs = bs;
+ q_stats.qs = qs;
if (mnl_attr_get_type(attr) != TCA_STATS2)
continue;