mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
selftests: mptcp: connect: fix C23 extension warning
GCC was complaining about the new label:
mptcp_connect.c:187:2: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
187 | int err = getaddrinfo(node, service, hints, res);
| ^
Simply declare 'err' before the label to avoid this warning.
Fixes: a862771d1a
("selftests: mptcp: use IPPROTO_MPTCP for getaddrinfo")
Cc: stable@vger.kernel.org
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250815-net-mptcp-misc-fixes-6-17-rc2-v1-7-521fe9957892@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
f92199f551
commit
2eefbed30d
@ -183,9 +183,10 @@ static void xgetaddrinfo(const char *node, const char *service,
|
||||
struct addrinfo *hints,
|
||||
struct addrinfo **res)
|
||||
{
|
||||
again:
|
||||
int err = getaddrinfo(node, service, hints, res);
|
||||
int err;
|
||||
|
||||
again:
|
||||
err = getaddrinfo(node, service, hints, res);
|
||||
if (err) {
|
||||
const char *errstr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user