]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: drop weird "const" usage in function parameters
authorLennart Poettering <lennart@poettering.net>
Fri, 3 Jun 2016 17:20:46 +0000 (19:20 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 3 Jun 2016 17:20:46 +0000 (19:20 +0200)
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".

src/network/networkd-fdb.c
src/network/networkd-fdb.h
src/network/networkd-link.c

index 4d51fa41e27e7be971e84655e952340556b3a4ae..9829438ba241eb76255950fe6e1c9d615e4df4de 100644 (file)
@@ -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;
index 84410714f530da4edde6b8ec0dc9505df6f508c4..2d7d28735cad33991ef66456e2cab5b2569a9a79 100644 (file)
@@ -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)
index ba4147f875639c4c6bc2fd7a62d1c5fbebca771a..5bf98765c6bad2851f460276d669acd45c683286 100644 (file)
@@ -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;