diff options
author | Phil Sutter <phil@nwl.cc> | 2016-07-18 16:48:42 +0200 |
---|---|---|
committer | Stephen Hemminger <shemming@brocade.com> | 2016-07-20 12:05:24 -0700 |
commit | d17b136f7d7dd6ed7ea518e4f068d3de735e8756 (patch) | |
tree | 822b758ac6ee3ab064c6b55f7d6e2adc5067b771 /lib/ll_map.c | |
parent | d892aaf7400ac410864ab03b48891e34206b1307 (diff) | |
download | platform_external_iproute2-d17b136f7d7dd6ed7ea518e4f068d3de735e8756.tar.gz platform_external_iproute2-d17b136f7d7dd6ed7ea518e4f068d3de735e8756.tar.bz2 platform_external_iproute2-d17b136f7d7dd6ed7ea518e4f068d3de735e8756.zip |
Use C99 style initializers everywhere
This big patch was compiled by vimgrepping for memset calls and changing
to C99 initializer if applicable. One notable exception is the
initialization of union bpf_attr in tc/tc_bpf.c: changing it would break
for older gcc versions (at least <=3.4.6).
Calls to memset for struct rtattr pointer fields for parse_rtattr*()
were just dropped since they are not needed.
The changes here allowed the compiler to discover some unused variables,
so get rid of them, too.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
Diffstat (limited to 'lib/ll_map.c')
-rw-r--r-- | lib/ll_map.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/ll_map.c b/lib/ll_map.c index fa14a776..571d11e1 100644 --- a/lib/ll_map.c +++ b/lib/ll_map.c @@ -103,7 +103,6 @@ int ll_remember_index(const struct sockaddr_nl *who, return 0; } - memset(tb, 0, sizeof(tb)); parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), IFLA_PAYLOAD(n)); ifname = rta_getattr_str(tb[IFLA_IFNAME]); if (ifname == NULL) |