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>
This commit is contained in:
parent
459ce6e3d7
commit
0015ada629
|
|
@ -943,12 +943,14 @@ skip_it:
|
||||||
}
|
}
|
||||||
|
|
||||||
int rtnl_dump_filter_nc(struct rtnl_handle *rth,
|
int rtnl_dump_filter_nc(struct rtnl_handle *rth,
|
||||||
rtnl_filter_t filter,
|
rtnl_filter_t filter,
|
||||||
void *arg1, __u16 nc_flags)
|
void *arg1, __u16 nc_flags)
|
||||||
{
|
{
|
||||||
const struct rtnl_dump_filter_arg a[2] = {
|
const struct rtnl_dump_filter_arg a[] = {
|
||||||
{ .filter = filter, .arg1 = arg1,
|
{
|
||||||
.errhndlr = NULL, .arg2 = NULL, .nc_flags = nc_flags, },
|
.filter = filter, .arg1 = arg1,
|
||||||
|
.nc_flags = nc_flags,
|
||||||
|
},
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -962,9 +964,12 @@ int rtnl_dump_filter_errhndlr_nc(struct rtnl_handle *rth,
|
||||||
void *arg2,
|
void *arg2,
|
||||||
__u16 nc_flags)
|
__u16 nc_flags)
|
||||||
{
|
{
|
||||||
const struct rtnl_dump_filter_arg a[2] = {
|
const struct rtnl_dump_filter_arg a[] = {
|
||||||
{ .filter = filter, .arg1 = arg1,
|
{
|
||||||
.errhndlr = errhndlr, .arg2 = arg2, .nc_flags = nc_flags, },
|
.filter = filter, .arg1 = arg1,
|
||||||
|
.errhndlr = errhndlr, .arg2 = arg2,
|
||||||
|
.nc_flags = nc_flags,
|
||||||
|
},
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue