summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2021-07-07 07:39:07 -0700
committerStephen Hemminger <stephen@networkplumber.org>2021-07-07 07:39:07 -0700
commit0015ada629a70be0139ee9a0e4d3fb6512f90f56 (patch)
tree0e064bd347ffaa7c60bed9648b1c9537db83d4ed
parent459ce6e3d792afe3fe8f7f4b78baa68bb72b8439 (diff)
downloadiproute2-0015ada629a70be0139ee9a0e4d3fb6512f90f56.tar.gz
libnetlink: cosmetic changes
Don't initialize arguments that are NULL, and format initialization in a more logical way. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
-rw-r--r--lib/libnetlink.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/lib/libnetlink.c b/lib/libnetlink.c
index b92f10e1..5f062c7d 100644
--- a/lib/libnetlink.c
+++ b/lib/libnetlink.c
@@ -943,12 +943,14 @@ skip_it:
}
int rtnl_dump_filter_nc(struct rtnl_handle *rth,
- rtnl_filter_t filter,
- void *arg1, __u16 nc_flags)
-{
- const struct rtnl_dump_filter_arg a[2] = {
- { .filter = filter, .arg1 = arg1,
- .errhndlr = NULL, .arg2 = NULL, .nc_flags = nc_flags, },
+ rtnl_filter_t filter,
+ void *arg1, __u16 nc_flags)
+{
+ const struct rtnl_dump_filter_arg a[] = {
+ {
+ .filter = filter, .arg1 = arg1,
+ .nc_flags = nc_flags,
+ },
{ },
};
@@ -962,9 +964,12 @@ int rtnl_dump_filter_errhndlr_nc(struct rtnl_handle *rth,
void *arg2,
__u16 nc_flags)
{
- const struct rtnl_dump_filter_arg a[2] = {
- { .filter = filter, .arg1 = arg1,
- .errhndlr = errhndlr, .arg2 = arg2, .nc_flags = nc_flags, },
+ const struct rtnl_dump_filter_arg a[] = {
+ {
+ .filter = filter, .arg1 = arg1,
+ .errhndlr = errhndlr, .arg2 = arg2,
+ .nc_flags = nc_flags,
+ },
{ },
};