mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2026-01-08 21:27:16 +00:00
No need to initialize rtattr fields before parsing
Since parse_rtattr_flags() calls memset already, there is no need for callers to do so themselves. Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: David Ahern <dsa@cumulusnetworks.com>
This commit is contained in:
parent
f89bb0210f
commit
30a8842c49
@ -449,7 +449,7 @@ static void print_num(FILE *fp, unsigned int width, uint64_t count)
|
||||
|
||||
static void print_vf_stats64(FILE *fp, struct rtattr *vfstats)
|
||||
{
|
||||
struct rtattr *vf[IFLA_VF_STATS_MAX + 1] = {};
|
||||
struct rtattr *vf[IFLA_VF_STATS_MAX + 1];
|
||||
|
||||
if (vfstats->rta_type != IFLA_VF_STATS) {
|
||||
fprintf(stderr, "BUG: rta type is %d\n", vfstats->rta_type);
|
||||
|
||||
@ -219,7 +219,7 @@ static void graph_cls_show(FILE *fp, char *buf, struct hlist_head *root_list,
|
||||
{
|
||||
struct hlist_node *n, *tmp_cls;
|
||||
char cls_id_str[256] = {};
|
||||
struct rtattr *tb[TCA_MAX + 1] = {};
|
||||
struct rtattr *tb[TCA_MAX + 1];
|
||||
struct qdisc_util *q;
|
||||
char str[100] = {};
|
||||
|
||||
@ -304,7 +304,7 @@ int print_class(const struct sockaddr_nl *who,
|
||||
FILE *fp = (FILE *)arg;
|
||||
struct tcmsg *t = NLMSG_DATA(n);
|
||||
int len = n->nlmsg_len;
|
||||
struct rtattr *tb[TCA_MAX + 1] = {};
|
||||
struct rtattr *tb[TCA_MAX + 1];
|
||||
struct qdisc_util *q;
|
||||
char abuf[256];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user