[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 66/151: curl_setup_once: consistently use WHILE_FALSE in macros
From: |
gnunet |
Subject: |
[gnurl] 66/151: curl_setup_once: consistently use WHILE_FALSE in macros |
Date: |
Fri, 20 Dec 2019 14:26:15 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 66e21520f369ab92b49a515704b68fa842face85
Author: Daniel Gustafsson <address@hidden>
AuthorDate: Thu Nov 28 16:02:13 2019 +0100
curl_setup_once: consistently use WHILE_FALSE in macros
The WHILE_FALSE construction is used to avoid compiler warnings in
macro constructions. This fixes a few instances where it was not
used in order to keep the code consistent.
Closes #4649
Reviewed-by: Daniel Stenberg <address@hidden>
---
lib/cookie.c | 2 +-
lib/sha256.c | 4 ++--
lib/vssh/libssh.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/cookie.c b/lib/cookie.c
index f56bd85a9..7e68b0785 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -1226,7 +1226,7 @@ static int cookie_sort_ct(const void *p1, const void *p2)
if(!d->field) \
goto fail; \
} \
- } while(0)
+ } WHILE_FALSE
static struct Cookie *dup_cookie(struct Cookie *src)
{
diff --git a/lib/sha256.c b/lib/sha256.c
index f9287af23..0dcd24c08 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -58,7 +58,7 @@ do {
\
(a)[1] = (unsigned char)((((unsigned long) (val)) >> 16) & 0xff); \
(a)[2] = (unsigned char)((((unsigned long) (val)) >> 8) & 0xff); \
(a)[3] = (unsigned char)(((unsigned long) (val)) & 0xff); \
-} while(0)
+} WHILE_FALSE;
#ifdef HAVE_LONGLONG
#define WPA_PUT_BE64(a, val) \
@@ -71,7 +71,7 @@ do {
\
(a)[5] = (unsigned char)(((unsigned long long)(val)) >> 16); \
(a)[6] = (unsigned char)(((unsigned long long)(val)) >> 8); \
(a)[7] = (unsigned char)(((unsigned long long)(val)) & 0xff); \
-} while(0)
+} WHILE_FALSE;
#else
#define WPA_PUT_BE64(a, val) \
do { \
diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c
index 070879d94..ef8745246 100644
--- a/lib/vssh/libssh.c
+++ b/lib/vssh/libssh.c
@@ -98,7 +98,7 @@
/* A recent macro provided by libssh. Or make our own. */
#ifndef SSH_STRING_FREE_CHAR
#define SSH_STRING_FREE_CHAR(x) \
- do { if((x) != NULL) { ssh_string_free_char(x); x = NULL; } } while(0)
+ do { if((x) != NULL) { ssh_string_free_char(x); x = NULL; } } WHILE_FALSE
#endif
/* Local functions: */
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 49/151: schannel: fix --tls-max for when min is --tlsv1 or default, (continued)
- [gnurl] 49/151: schannel: fix --tls-max for when min is --tlsv1 or default, gnunet, 2019/12/20
- [gnurl] 65/151: http_ntlm: Remove duplicate NSS initialisation, gnunet, 2019/12/20
- [gnurl] 54/151: curl: fix --upload-file . hangs if delay in STDIN, gnunet, 2019/12/20
- [gnurl] 47/151: projects: Fix Visual Studio projects SSH builds, gnunet, 2019/12/20
- [gnurl] 56/151: travis: export the CC/CXX variables when set, gnunet, 2019/12/20
- [gnurl] 57/151: ngtcp2: fix thread-safety bug in error-handling, gnunet, 2019/12/20
- [gnurl] 60/151: mailmap: Niall O'Reilly's name, gnunet, 2019/12/20
- [gnurl] 61/151: docs: fix typos, gnunet, 2019/12/20
- [gnurl] 38/151: projects: Fix Visual Studio wolfSSL configurations, gnunet, 2019/12/20
- [gnurl] 53/151: XFERINFOFUNCTION: support CURL_PROGRESSFUNC_CONTINUE, gnunet, 2019/12/20
- [gnurl] 66/151: curl_setup_once: consistently use WHILE_FALSE in macros,
gnunet <=
- [gnurl] 48/151: checksrc.bat: Add a check for vquic and vssh directories, gnunet, 2019/12/20
- [gnurl] 64/151: checksrc: fix regexp for ASSIGNWITHINCONDITION, gnunet, 2019/12/20
- [gnurl] 58/151: travis: build ngtcp2 with --enable-lib-only, gnunet, 2019/12/20
- [gnurl] 51/151: curl_multi_wakeup.3: add example and AVAILABILITY, gnunet, 2019/12/20
- [gnurl] 55/151: dist: add error-codes.pl, gnunet, 2019/12/20
- [gnurl] 63/151: RELEASE-NOTES: synced, gnunet, 2019/12/20
- [gnurl] 59/151: doh: use dedicated probe slots, gnunet, 2019/12/20
- [gnurl] 62/151: curl: two new command line options for etags, gnunet, 2019/12/20
- [gnurl] 70/151: global_init: undo the "intialized" bump in case of failure, gnunet, 2019/12/20
- [gnurl] 67/151: sha256: bump the copyright year range, gnunet, 2019/12/20