Skip to content

Commit 29b403b

Browse files
committed
mctpd: constify is_eid_in_bridge_pool
Guarantee that we're not altering ctx/net data. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
1 parent 0460303 commit 29b403b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mctpd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,11 +1584,11 @@ static int endpoint_send_set_endpoint_id(const struct peer *peer,
15841584
}
15851585

15861586
// Checks if given EID belongs to any bridge's pool range
1587-
static bool is_eid_in_bridge_pool(struct net *n, struct ctx *ctx,
1587+
static bool is_eid_in_bridge_pool(const struct net *n, const struct ctx *ctx,
15881588
mctp_eid_t eid)
15891589
{
15901590
for (int i = ctx->dyn_eid_min; i <= eid; i++) {
1591-
struct peer *peer = n->peers[i];
1591+
const struct peer *peer = n->peers[i];
15921592
if (peer && peer->pool_size > 0) {
15931593
if (eid >= peer->pool_start &&
15941594
eid < peer->pool_start + peer->pool_size) {

0 commit comments

Comments
 (0)