diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2024-11-07 19:40:37 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-11-08 08:24:58 +0100 |
commit | 58fa5508bde073a39c93a8f1296e363f1786c84c (patch) | |
tree | c26869b271f6a49daa7e32d271677cffffb559f4 /tcp_vu.c | |
parent | 71869e2912b9ede9532725e9ee5e7752b7137009 (diff) | |
download | passt-58fa5508bde073a39c93a8f1296e363f1786c84c.tar passt-58fa5508bde073a39c93a8f1296e363f1786c84c.tar.gz passt-58fa5508bde073a39c93a8f1296e363f1786c84c.tar.bz2 passt-58fa5508bde073a39c93a8f1296e363f1786c84c.tar.lz passt-58fa5508bde073a39c93a8f1296e363f1786c84c.tar.xz passt-58fa5508bde073a39c93a8f1296e363f1786c84c.tar.zst passt-58fa5508bde073a39c93a8f1296e363f1786c84c.zip |
tap, tcp, util: Add some missing SOCK_CLOEXEC flags
I have no idea why, but these are reported by clang-tidy (19.2.1) on
Alpine (x86) only:
/home/sbrivio/passt/tap.c:1139:38: error: 'socket' should use SOCK_CLOEXEC where possible [android-cloexec-socket,-warnings-as-errors]
1139 | int fd = socket(AF_UNIX, SOCK_STREAM, 0);
| ^
| | SOCK_CLOEXEC
/home/sbrivio/passt/tap.c:1158:51: error: 'socket' should use SOCK_CLOEXEC where possible [android-cloexec-socket,-warnings-as-errors]
1158 | ex = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0);
| ^
| | SOCK_CLOEXEC
/home/sbrivio/passt/tcp.c:1413:44: error: 'socket' should use SOCK_CLOEXEC where possible [android-cloexec-socket,-warnings-as-errors]
1413 | s = socket(af, SOCK_STREAM | SOCK_NONBLOCK, IPPROTO_TCP);
| ^
| | SOCK_CLOEXEC
/home/sbrivio/passt/util.c:188:38: error: 'socket' should use SOCK_CLOEXEC where possible [android-cloexec-socket,-warnings-as-errors]
188 | if ((s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
| ^
| | SOCK_CLOEXEC
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tcp_vu.c')
0 files changed, 0 insertions, 0 deletions