]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip-address: constify match_link_kind arg
authorPhil Sutter <phil@nwl.cc>
Thu, 30 Jun 2016 14:47:02 +0000 (16:47 +0200)
committerStephen Hemminger <shemming@brocade.com>
Thu, 7 Jul 2016 04:08:54 +0000 (21:08 -0700)
Since the function won't ever change the data 'kind' is pointing at, it
can sanely be made const.

Fixes: e0513807f6dbb ("ip-address: Support filtering by slave type, too")
Suggested-by: Stephen Hemminger <shemming@brocade.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
ip/ipaddress.c

index d4d649505e15aac479c33bdef1318656b2b4f8ec..02bc9029d6b20b20a861e5cf435e03ed7039a527 100644 (file)
@@ -220,7 +220,7 @@ static char *parse_link_kind(struct rtattr *tb, bool slave)
        return "";
 }
 
-static int match_link_kind(struct rtattr **tb, char *kind, bool slave)
+static int match_link_kind(struct rtattr **tb, const char *kind, bool slave)
 {
        if (!tb[IFLA_LINKINFO])
                return -1;