mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
networkd: drop weird "const" usage in function parameters
We generally only use "const" to constify the destination of pointers, but not the pointers themselves, as they are copied anyway during C function invocation. Hence, drop this usage of "const".
This commit is contained in:
parent
75f8a779fd
commit
a60a720c7e
@ -32,7 +32,7 @@
|
||||
/* create a new FDB entry or get an existing one. */
|
||||
int fdb_entry_new_static(
|
||||
Network *network,
|
||||
const unsigned section,
|
||||
unsigned section,
|
||||
FdbEntry **ret) {
|
||||
|
||||
_cleanup_fdbentry_free_ FdbEntry *fdb_entry = NULL;
|
||||
@ -102,7 +102,7 @@ static int set_fdb_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userda
|
||||
}
|
||||
|
||||
/* send a request to the kernel to add a FDB entry in its static MAC table. */
|
||||
int fdb_entry_configure(Link *const link, FdbEntry *const fdb_entry) {
|
||||
int fdb_entry_configure(Link *link, FdbEntry *fdb_entry) {
|
||||
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
|
||||
sd_netlink *rtnl;
|
||||
int r;
|
||||
|
@ -36,9 +36,9 @@ struct FdbEntry {
|
||||
LIST_FIELDS(FdbEntry, static_fdb_entries);
|
||||
};
|
||||
|
||||
int fdb_entry_new_static(Network *const network, const unsigned section, FdbEntry **ret);
|
||||
int fdb_entry_new_static(Network *network, unsigned section, FdbEntry **ret);
|
||||
void fdb_entry_free(FdbEntry *fdb_entry);
|
||||
int fdb_entry_configure(Link *const link, FdbEntry *const fdb_entry);
|
||||
int fdb_entry_configure(Link *link, FdbEntry *fdb_entry);
|
||||
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(FdbEntry*, fdb_entry_free);
|
||||
#define _cleanup_fdbentry_free_ _cleanup_(fdb_entry_freep)
|
||||
|
@ -1092,7 +1092,7 @@ int link_address_remove_handler(sd_netlink *rtnl, sd_netlink_message *m, void *u
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int link_set_bridge_fdb(Link *const link) {
|
||||
static int link_set_bridge_fdb(Link *link) {
|
||||
FdbEntry *fdb_entry;
|
||||
int r = 0;
|
||||
|
||||
@ -1107,7 +1107,7 @@ static int link_set_bridge_fdb(Link *const link) {
|
||||
return r;
|
||||
}
|
||||
|
||||
static int link_set_proxy_arp(Link *const link) {
|
||||
static int link_set_proxy_arp(Link *link) {
|
||||
const char *p = NULL;
|
||||
int r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user