diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-01-15 17:39:43 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-01-16 21:49:27 +0100 |
commit | a179ca6707b29cfc01371fb5636b2f49d263ab83 (patch) | |
tree | a783d015ca015059be6ce1b54e91565ef221c498 /tcp_splice.c | |
parent | f60c85194b87c6cc182b9868c9e6a6b8ac1af48f (diff) | |
download | passt-a179ca6707b29cfc01371fb5636b2f49d263ab83.tar passt-a179ca6707b29cfc01371fb5636b2f49d263ab83.tar.gz passt-a179ca6707b29cfc01371fb5636b2f49d263ab83.tar.bz2 passt-a179ca6707b29cfc01371fb5636b2f49d263ab83.tar.lz passt-a179ca6707b29cfc01371fb5636b2f49d263ab83.tar.xz passt-a179ca6707b29cfc01371fb5636b2f49d263ab83.tar.zst passt-a179ca6707b29cfc01371fb5636b2f49d263ab83.zip |
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 <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_splice.c')
-rw-r--r-- | tcp_splice.c | 2 |
1 files changed, 1 insertions, 1 deletions
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], |