tests: initialize worker_st using = {0}

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
Nikos Mavrogiannopoulos
2026-03-29 17:32:16 +02:00
parent 979ccc711d
commit 0ba0c091af
2 changed files with 2 additions and 6 deletions
+1 -3
View File
@@ -73,12 +73,10 @@ void writer(int fd)
void receiver(int fd)
{
worker_st ws;
worker_st ws = { 0 };
unsigned char buf[MAX_SIZE * 3];
int ret;
unsigned int i;
memset(&ws, 0, sizeof(ws));
ws.conn_fd = fd;
for (i = 0; i < ITERATIONS; i++) {
+1 -3
View File
@@ -39,12 +39,10 @@ static unsigned int try(const char *src, unsigned int src_port, const char *dst,
unsigned int dst_port)
{
char str[256];
struct worker_st ws;
struct worker_st ws = { 0 };
unsigned int ipv6 = 0;
int ret;
memset(&ws, 0, sizeof(ws));
if (strchr(src, ':') != NULL) {
/* ipv6 */
snprintf(str, sizeof(str), "TCP6 %s %s %u %u\r\n", src, dst,