lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 30 Jun 2016 16:47:02 +0200
From:	Phil Sutter <phil@....cc>
To:	Stephen Hemminger <shemming@...cade.com>
Cc:	netdev@...r.kernel.org
Subject: [iproute PATCH] ip-address: constify match_link_kind arg

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@...cade.com>
Signed-off-by: Phil Sutter <phil@....cc>
---
 ip/ipaddress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index d4d649505e15a..02bc9029d6b20 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -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;
-- 
2.8.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ