tests/netinet: push variable 'sin' into function scope

This should fix build with GCC 13.

Fixes:	861274c9f8
This commit is contained in:
Gleb Smirnoff 2024-02-02 21:08:16 -08:00
parent c1f6704bf8
commit 70f5c6e34f

View file

@ -33,17 +33,15 @@
#include <atf-c.h>
static struct sockaddr_in sin = {
.sin_family = AF_INET,
.sin_len = sizeof(sin),
};
static const char buf[] = "hello";
static char repl[sizeof(buf)];
ATF_TC_WITHOUT_HEAD(tcp_implied_connect);
ATF_TC_BODY(tcp_implied_connect, tc)
{
struct sockaddr_in sin = {
.sin_family = AF_INET,
.sin_len = sizeof(sin),
};
const char buf[] = "hello";
char repl[sizeof(buf)];
socklen_t len;
int s, c, a;