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
This commit is contained in:
Daniel Stenberg 2019-12-16 08:50:46 +01:00
parent 7282093458
commit bdb5b6dd5b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 14 additions and 5 deletions

View file

@ -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: */