gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] 132/154: reduce variable scope


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 132/154: reduce variable scope
Date: Mon, 19 Aug 2019 10:17:24 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository libmicrohttpd.

commit d21cf2c1c225c888a3fd6161a6a04357714cc628
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Aug 1 21:02:31 2019 +0200

    reduce variable scope
---
 src/microhttpd/mhd_send.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 5fed8767..36d8afa7 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -350,7 +350,6 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
 {
 #if defined(HAVE_SENDMSG) || defined(HAVE_WRITEV)
   MHD_socket s = connection->socket_fd;
-  int iovcnt;
   ssize_t ret;
   struct iovec vector[2];
 
@@ -374,8 +373,12 @@ MHD_send_on_connection2_ (struct MHD_Connection 
*connection,
     ret = sendmsg (s, &msg, MAYBE_MSG_NOSIGNAL);
   }
 #elif HAVE_WRITEV
-  iovcnt = sizeof (vector) / sizeof (struct iovec);
-  ret = writev (s, vector, iovcnt);
+  {
+    int iovcnt;
+
+    iovcnt = sizeof (vector) / sizeof (struct iovec);
+    ret = writev (s, vector, iovcnt);
+  }
 #endif
 
   /* Only if we succeeded sending the full buffer, we need to make sure that

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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