summaryrefslogtreecommitdiffstats
path: root/lib/route
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-10-09 11:46:44 (GMT)
committerThomas Haller <thaller@redhat.com>2017-10-09 11:51:29 (GMT)
commitb4802a17a7655bfeee3e9c06e649d30b96dbad3b (patch)
tree8a70c993fc2d929f51b2ab64119900ecbd0e8737 /lib/route
parent3fe3454b0228a6c9729ce9ffebf62bda85fd87ab (diff)
downloadlibnl-b4802a17a7655bfeee3e9c06e649d30b96dbad3b.zip
libnl-b4802a17a7655bfeee3e9c06e649d30b96dbad3b.tar.gz
libnl-b4802a17a7655bfeee3e9c06e649d30b96dbad3b.tar.bz2
nl: add "const" specifier for nla_policy argument of parse functions
Adding const to a function argument is generally not an API break (at least, if the argument is a struct, like in this case). Usually we declare the policy as static variables. The user should be able to mark them as "const", so that the linker makes the policy array read-only. Adjust the API to allow for that. Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/route')
-rw-r--r--lib/route/tc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/route/tc.c b/lib/route/tc.c
index f5b23f0..5dc43e1 100644
--- a/lib/route/tc.c
+++ b/lib/route/tc.c
@@ -37,7 +37,7 @@ static struct nla_policy tc_policy[TCA_MAX+1] = {
};
int tca_parse(struct nlattr **tb, int maxattr, struct rtnl_tc *g,
- struct nla_policy *policy)
+ const struct nla_policy *policy)
{
if (g->ce_mask & TCA_ATTR_OPTS)