浏览代码

xfrm: Const'ify policy arg and local selector in xfrm_policy_match.

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 14 年之前
父节点
当前提交
f299d557cb
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      net/xfrm/xfrm_policy.c

+ 3 - 2
net/xfrm/xfrm_policy.c

@@ -869,10 +869,11 @@ EXPORT_SYMBOL(xfrm_policy_walk_done);
  *
  * Returns 0 if policy found, else an -errno.
  */
-static int xfrm_policy_match(struct xfrm_policy *pol, const struct flowi *fl,
+static int xfrm_policy_match(const struct xfrm_policy *pol,
+			     const struct flowi *fl,
 			     u8 type, u16 family, int dir)
 {
-	struct xfrm_selector *sel = &pol->selector;
+	const struct xfrm_selector *sel = &pol->selector;
 	int match, ret = -ESRCH;
 
 	if (pol->family != family ||