[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 01/02: tests: Initialize argument to 'accept' call.
From: |
Ludovic Courtès |
Subject: |
[shepherd] 01/02: tests: Initialize argument to 'accept' call. |
Date: |
Wed, 3 May 2023 06:35:26 -0400 (EDT) |
civodul pushed a commit to branch master
in repository shepherd.
commit 90ac0a28a9c0224bed0d579dda9831d0f89a3047
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed May 3 12:02:31 2023 +0200
tests: Initialize argument to 'accept' call.
* tests/close-on-exec.sh: In C program, initialize 'len'.
---
tests/close-on-exec.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/close-on-exec.sh b/tests/close-on-exec.sh
index 47e563d..47ac9b0 100644
--- a/tests/close-on-exec.sh
+++ b/tests/close-on-exec.sh
@@ -60,7 +60,7 @@ main (int argc, char *argv[])
if (getenv ("LISTEN_FDS") != NULL) /* systemd */
{
struct sockaddr_storage address;
- socklen_t len;
+ socklen_t len = sizeof address;
int fd = accept (3, (struct sockaddr *) &address, &len);
assert (fd >= 0);
}