[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] branch master updated: style fixes
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] branch master updated: style fixes |
Date: |
Sat, 18 Aug 2018 13:26:40 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new 605e35bb style fixes
605e35bb is described below
commit 605e35bb6e2c9b29067b2fdf5d7d28ac8a475aba
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Aug 18 13:26:30 2018 +0200
style fixes
---
src/examples/timeout.c | 4 ++--
src/include/microhttpd.h | 4 ++--
src/microhttpd/test_upgrade.c | 21 ++++++++++++++-------
src/testcurl/test_get_sendfile.c | 4 +++-
4 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/src/examples/timeout.c b/src/examples/timeout.c
index b9569547..91de1599 100644
--- a/src/examples/timeout.c
+++ b/src/examples/timeout.c
@@ -78,7 +78,7 @@ main (void)
MHD_OPTION_END);
if (NULL == daemon)
return 1;
- getchar();
- MHD_stop_daemon(daemon);
+ (void) getchar();
+ MHD_stop_daemon (daemon);
return 0;
}
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index e1a8d215..dae41fba 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -2595,9 +2595,9 @@ MHD_suspend_connection (struct MHD_Connection
*connection);
* result in undefined behavior.
*
* If you are using this function in ``external'' select mode, you must
- * make sure to run #MHD_run() and #MHD_get_timeout() afterwards (before
+ * make sure to run #MHD_run() and #MHD_get_timeout() afterwards (before
* again calling #MHD_get_fdset()), as otherwise the change may not be
- * reflected in the set returned by #MHD_get_fdset() and you may end up
+ * reflected in the set returned by #MHD_get_fdset() and you may end up
* with a connection that is stuck until the next network activity.
*
* @param connection the connection to resume
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index a0703441..caf12e61 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -103,8 +103,10 @@ gnutlscli_connect (int *sock,
MHD_socket_close_chk_ (sp[1]);
(void) close (0);
(void) close (1);
- dup2 (sp[0], 0);
- dup2 (sp[0], 1);
+ if (-1 == dup2 (sp[0], 0))
+ abort ();
+ if (-1 == dup2 (sp[0], 1))
+ abort ();
MHD_socket_close_chk_ (sp[0]);
if (TLS_CLI_GNUTLS == use_tls_tool)
{
@@ -946,6 +948,7 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon)
fd_set rs;
MHD_UNSIGNED_LONG_LONG to;
struct timeval tv;
+ int ret;
di = MHD_get_daemon_info (daemon,
MHD_DAEMON_INFO_EPOLL_FD);
@@ -962,11 +965,15 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon)
to = 1000;
tv.tv_sec = to / 1000;
tv.tv_usec = 1000 * (to % 1000);
- select (ep + 1,
- &rs,
- NULL,
- NULL,
- &tv);
+ ret = select (ep + 1,
+ &rs,
+ NULL,
+ NULL,
+ &tv);
+ if ( (-1 == ret) &&
+ (EAGAIN != errno) &&
+ (EINTR != errno) )
+ abort ();
MHD_run (daemon);
}
}
diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c
index fb040afe..6c44318a 100644
--- a/src/testcurl/test_get_sendfile.c
+++ b/src/testcurl/test_get_sendfile.c
@@ -596,7 +596,9 @@ main (int argc, char *const *argv)
free (sourcefile);
return 1;
}
- fwrite (TESTSTR, strlen (TESTSTR), 1, f);
+ if (strlen (TESTSTR) !=
+ fwrite (TESTSTR, strlen (TESTSTR), 1, f))
+ abort ();
fclose (f);
if (0 != curl_global_init (CURL_GLOBAL_WIN32))
return 2;
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libmicrohttpd] branch master updated: style fixes,
gnunet <=