From a179ca6707b29cfc01371fb5636b2f49d263ab83 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 15 Jan 2024 17:39:43 +1100 Subject: treewide: Make a bunch of pointer variables pointers to const Sufficiently recent cppcheck (I'm using 2.13.0) seems to have added another warning for pointer variables which could be pointer to const but aren't. Use this to make a bunch of variables const pointers where they previously weren't for no particular reason. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- tcp_splice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tcp_splice.c') diff --git a/tcp_splice.c b/tcp_splice.c index 1655f8e..0e2e04c 100644 --- a/tcp_splice.c +++ b/tcp_splice.c @@ -127,7 +127,7 @@ static int tcp_splice_epoll_ctl(const struct ctx *c, struct tcp_splice_conn *conn) { int m = conn->in_epoll ? EPOLL_CTL_MOD : EPOLL_CTL_ADD; - union epoll_ref ref[SIDES] = { + const union epoll_ref ref[SIDES] = { { .type = EPOLL_TYPE_TCP, .fd = conn->s[0], .flowside = FLOW_SIDX(conn, 0) }, { .type = EPOLL_TYPE_TCP, .fd = conn->s[1], -- cgit v1.2.3