qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/4] tests: use closesocket()


From: Thomas Huth
Subject: Re: [PATCH 1/4] tests: use closesocket()
Date: Mon, 13 Feb 2023 09:03:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 12/02/2023 21.49, marcandre.lureau@redhat.com wrote:
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Because they are actually sockets...

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
  tests/unit/socket-helpers.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/unit/socket-helpers.c b/tests/unit/socket-helpers.c
index eecadf3a3c..914b3aa0cf 100644
--- a/tests/unit/socket-helpers.c
+++ b/tests/unit/socket-helpers.c
@@ -117,13 +117,13 @@ static int socket_can_bind_connect(const char *hostname, 
int family)
cleanup:
      if (afd != -1) {
-        close(afd);
+        closesocket(afd);
      }
      if (cfd != -1) {
-        close(cfd);
+        closesocket(cfd);
      }
      if (lfd != -1) {
-        close(lfd);
+        closesocket(lfd);
      }
      if (res) {
          freeaddrinfo(res);

Reviewed-by: Thomas Huth <thuth@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]