mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:43:33 +03:00
misc: fix "warning: empty expression statement has no effect"
Turned several macros into do-while(0) style to allow their use to work find with semicolon. Bug:08e8455ddd (commitcomment-45433279)Follow-up to08e8455dddReported-by: Gisle Vanem Closes #6376
This commit is contained in:
parent
ec424f311a
commit
8ab78f720a
11 changed files with 84 additions and 69 deletions
|
|
@ -61,12 +61,14 @@
|
|||
It converts digest text to ASCII so the MD5 will be correct for
|
||||
what ultimately goes over the network.
|
||||
*/
|
||||
#define CURL_OUTPUT_DIGEST_CONV(a, b) \
|
||||
result = Curl_convert_to_network(a, b, strlen(b)); \
|
||||
if(result) { \
|
||||
free(b); \
|
||||
return result; \
|
||||
}
|
||||
#define CURL_OUTPUT_DIGEST_CONV(a, b) \
|
||||
do { \
|
||||
result = Curl_convert_to_network(a, b, strlen(b)); \
|
||||
if(result) { \
|
||||
free(b); \
|
||||
return result; \
|
||||
} \
|
||||
} while(0)
|
||||
#endif /* !USE_WINDOWS_SSPI */
|
||||
|
||||
bool Curl_auth_digest_get_pair(const char *str, char *value, char *content,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue