mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
xfrm: constify xfrm_replay structures
The xfrm_replay structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
This commit is contained in:
parent
0184165b2f
commit
e45a8a9e60
@ -187,7 +187,7 @@ struct xfrm_state {
|
|||||||
struct xfrm_replay_state_esn *preplay_esn;
|
struct xfrm_replay_state_esn *preplay_esn;
|
||||||
|
|
||||||
/* The functions for replay detection. */
|
/* The functions for replay detection. */
|
||||||
struct xfrm_replay *repl;
|
const struct xfrm_replay *repl;
|
||||||
|
|
||||||
/* internal flag that only holds state for delayed aevent at the
|
/* internal flag that only holds state for delayed aevent at the
|
||||||
* moment
|
* moment
|
||||||
|
@ -558,7 +558,7 @@ static void xfrm_replay_advance_esn(struct xfrm_state *x, __be32 net_seq)
|
|||||||
x->repl->notify(x, XFRM_REPLAY_UPDATE);
|
x->repl->notify(x, XFRM_REPLAY_UPDATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct xfrm_replay xfrm_replay_legacy = {
|
static const struct xfrm_replay xfrm_replay_legacy = {
|
||||||
.advance = xfrm_replay_advance,
|
.advance = xfrm_replay_advance,
|
||||||
.check = xfrm_replay_check,
|
.check = xfrm_replay_check,
|
||||||
.recheck = xfrm_replay_check,
|
.recheck = xfrm_replay_check,
|
||||||
@ -566,7 +566,7 @@ static struct xfrm_replay xfrm_replay_legacy = {
|
|||||||
.overflow = xfrm_replay_overflow,
|
.overflow = xfrm_replay_overflow,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct xfrm_replay xfrm_replay_bmp = {
|
static const struct xfrm_replay xfrm_replay_bmp = {
|
||||||
.advance = xfrm_replay_advance_bmp,
|
.advance = xfrm_replay_advance_bmp,
|
||||||
.check = xfrm_replay_check_bmp,
|
.check = xfrm_replay_check_bmp,
|
||||||
.recheck = xfrm_replay_check_bmp,
|
.recheck = xfrm_replay_check_bmp,
|
||||||
@ -574,7 +574,7 @@ static struct xfrm_replay xfrm_replay_bmp = {
|
|||||||
.overflow = xfrm_replay_overflow_bmp,
|
.overflow = xfrm_replay_overflow_bmp,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct xfrm_replay xfrm_replay_esn = {
|
static const struct xfrm_replay xfrm_replay_esn = {
|
||||||
.advance = xfrm_replay_advance_esn,
|
.advance = xfrm_replay_advance_esn,
|
||||||
.check = xfrm_replay_check_esn,
|
.check = xfrm_replay_check_esn,
|
||||||
.recheck = xfrm_replay_recheck_esn,
|
.recheck = xfrm_replay_recheck_esn,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user