netlink: use (void) for function definitions with no arguments
For some of these Clang produced a warning that "a function declaration without a prototype is deprecated in all versions of C". In other cases the function defintion used () which did not match the header declaration, which used (void). Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
ae71263c66
commit
43d0c2ddd2
@ -561,13 +561,13 @@ static struct linux_netlink_provider linux_netlink_v1 = {
|
||||
};
|
||||
|
||||
void
|
||||
linux_netlink_register()
|
||||
linux_netlink_register(void)
|
||||
{
|
||||
linux_netlink_p = &linux_netlink_v1;
|
||||
}
|
||||
|
||||
void
|
||||
linux_netlink_deregister()
|
||||
linux_netlink_deregister(void)
|
||||
{
|
||||
linux_netlink_p = NULL;
|
||||
}
|
||||
|
@ -174,7 +174,8 @@ nlp_has_priv(struct nlpcb *nlp, int priv)
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
nl_find_port() {
|
||||
nl_find_port(void)
|
||||
{
|
||||
/*
|
||||
* app can open multiple netlink sockets.
|
||||
* Start with current pid, if already taken,
|
||||
|
@ -440,7 +440,7 @@ static const struct genl_cmd nlctrl_cmds[] = {
|
||||
};
|
||||
|
||||
static void
|
||||
genl_nlctrl_init()
|
||||
genl_nlctrl_init(void)
|
||||
{
|
||||
ctrl_family_id = genl_register_family(CTRL_FAMILY_NAME, 0, 2, CTRL_ATTR_MAX);
|
||||
genl_register_cmds(CTRL_FAMILY_NAME, nlctrl_cmds, NL_ARRAY_LEN(nlctrl_cmds));
|
||||
@ -448,7 +448,7 @@ genl_nlctrl_init()
|
||||
}
|
||||
|
||||
static void
|
||||
genl_nlctrl_destroy()
|
||||
genl_nlctrl_destroy(void)
|
||||
{
|
||||
genl_unregister_family(CTRL_FAMILY_NAME);
|
||||
}
|
||||
|
@ -559,7 +559,7 @@ rtnl_lle_event(void *arg __unused, struct llentry *lle, int evt)
|
||||
static const struct nlhdr_parser *all_parsers[] = { &ndmsg_parser };
|
||||
|
||||
void
|
||||
rtnl_neighs_init()
|
||||
rtnl_neighs_init(void)
|
||||
{
|
||||
NL_VERIFY_PARSERS(all_parsers);
|
||||
rtnl_register_messages(cmd_handlers, NL_ARRAY_LEN(cmd_handlers));
|
||||
@ -568,7 +568,7 @@ rtnl_neighs_init()
|
||||
}
|
||||
|
||||
void
|
||||
rtnl_neighs_destroy()
|
||||
rtnl_neighs_destroy(void)
|
||||
{
|
||||
EVENTHANDLER_DEREGISTER(lle_event, lle_event_p);
|
||||
}
|
||||
|
@ -590,7 +590,7 @@ consider_resize(struct unhop_ctl *ctl, uint32_t new_size)
|
||||
}
|
||||
|
||||
static bool __noinline
|
||||
vnet_init_unhops()
|
||||
vnet_init_unhops(void)
|
||||
{
|
||||
uint32_t num_buckets = 16;
|
||||
size_t alloc_size = CHT_SLIST_GET_RESIZE_SIZE(num_buckets);
|
||||
@ -998,7 +998,7 @@ static const struct rtnl_cmd_handler cmd_handlers[] = {
|
||||
static const struct nlhdr_parser *all_parsers[] = { &nhmsg_parser };
|
||||
|
||||
void
|
||||
rtnl_nexthops_init()
|
||||
rtnl_nexthops_init(void)
|
||||
{
|
||||
NL_VERIFY_PARSERS(all_parsers);
|
||||
rtnl_register_messages(cmd_handlers, NL_ARRAY_LEN(cmd_handlers));
|
||||
|
@ -981,7 +981,7 @@ static const struct rtnl_cmd_handler cmd_handlers[] = {
|
||||
static const struct nlhdr_parser *all_parsers[] = {&mpath_parser, &metrics_parser, &rtm_parser};
|
||||
|
||||
void
|
||||
rtnl_routes_init()
|
||||
rtnl_routes_init(void)
|
||||
{
|
||||
NL_VERIFY_PARSERS(all_parsers);
|
||||
rtnl_register_messages(cmd_handlers, NL_ARRAY_LEN(cmd_handlers));
|
||||
|
Loading…
Reference in New Issue
Block a user