[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 147/151: lib: remove ASSIGNWITHINCONDITION exceptions, use our c
From: |
gnunet |
Subject: |
[gnurl] 147/151: lib: remove ASSIGNWITHINCONDITION exceptions, use our code style |
Date: |
Fri, 20 Dec 2019 14:27:36 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit bdb5b6dd5b91a7960b778a2a6e76af028fc5596a
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Dec 16 08:50:46 2019 +0100
lib: remove ASSIGNWITHINCONDITION exceptions, use our code style
... even for macros
Reviewed-by: Daniel Gustafsson
Reviewed-by: Jay Satiro
Reported-by: Jay Satiro
Fixes #4683
Closes #4722
---
lib/curl_multibyte.h | 9 +++++++--
lib/vssh/libssh.c | 10 +++++++---
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/lib/curl_multibyte.h b/lib/curl_multibyte.h
index 5225e1811..3becf41cf 100644
--- a/lib/curl_multibyte.h
+++ b/lib/curl_multibyte.h
@@ -61,8 +61,13 @@ char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w);
#define Curl_convert_UTF8_to_tchar(ptr) Curl_convert_UTF8_to_wchar((ptr))
#define Curl_convert_tchar_to_UTF8(ptr) Curl_convert_wchar_to_UTF8((ptr))
-#define Curl_unicodefree(ptr) \
- do {if((ptr)) {free((ptr)); (ptr) = NULL;}} while(0)
+#define Curl_unicodefree(ptr) \
+ do { \
+ if(ptr) { \
+ free(ptr); \
+ (ptr) = NULL; \
+ } \
+ } while(0)
typedef union {
unsigned short *tchar_ptr;
diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c
index cad8b3786..62a7f1960 100644
--- a/lib/vssh/libssh.c
+++ b/lib/vssh/libssh.c
@@ -97,9 +97,13 @@
/* A recent macro provided by libssh. Or make our own. */
#ifndef SSH_STRING_FREE_CHAR
-/* !checksrc! disable ASSIGNWITHINCONDITION 1 */
-#define SSH_STRING_FREE_CHAR(x) \
- do { if((x) != NULL) { ssh_string_free_char(x); x = NULL; } } while(0)
+#define SSH_STRING_FREE_CHAR(x) \
+ do { \
+ if(x) { \
+ ssh_string_free_char(x); \
+ x = NULL; \
+ } \
+ } while(0)
#endif
/* Local functions: */
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 144/151: KNOWN_BUGS: TLS session cache doesn't work with TFO, (continued)
- [gnurl] 144/151: KNOWN_BUGS: TLS session cache doesn't work with TFO, gnunet, 2019/12/20
- [gnurl] 140/151: cirrus: Switch to the FreeBSD 12.1 point release & enable more tests., gnunet, 2019/12/20
- [gnurl] 145/151: Revert "checksrc: fix regexp for ASSIGNWITHINCONDITION", gnunet, 2019/12/20
- [gnurl] 122/151: unit1607: fix mem-leak in OOM, gnunet, 2019/12/20
- [gnurl] 134/151: RELEASE-NOTES: synced, gnunet, 2019/12/20
- [gnurl] 139/151: azure: the macos cmake doesn't need to install cmake, gnunet, 2019/12/20
- [gnurl] 137/151: libssh2: add support for ECDSA and ed25519 knownhost keys, gnunet, 2019/12/20
- [gnurl] 129/151: tests: fix build with `CURL_DISABLE_DOH`, gnunet, 2019/12/20
- [gnurl] 151/151: make gnurl, gnunet, 2019/12/20
- [gnurl] 141/151: docs: TLS SRP doesn't work with TLS 1.3, gnunet, 2019/12/20
- [gnurl] 147/151: lib: remove ASSIGNWITHINCONDITION exceptions, use our code style,
gnunet <=
- [gnurl] 146/151: tests: make sure checksrc runs on header files too, gnunet, 2019/12/20
- [gnurl] 150/151: makefile, gnunet, 2019/12/20
- [gnurl] 148/151: define: remove HAVE_ENGINE_LOAD_BUILTIN_ENGINES, not used anymore, gnunet, 2019/12/20
- [gnurl] 149/151: Merge remote-tracking branch 'upstream/master', gnunet, 2019/12/20