mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
tidy-up: macro parentheses
Add missing and drop redundant parentheses. Also: fix whitespace. Ref: #20690 Closes #20710
This commit is contained in:
parent
be2499f7dd
commit
102d4c8ba9
@ -3254,10 +3254,10 @@ CURL_EXTERN const char *curl_share_strerror(CURLSHcode error);
|
||||
CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
|
||||
|
||||
#define CURLPAUSE_RECV (1 << 0)
|
||||
#define CURLPAUSE_RECV_CONT (0)
|
||||
#define CURLPAUSE_RECV_CONT 0
|
||||
|
||||
#define CURLPAUSE_SEND (1 << 2)
|
||||
#define CURLPAUSE_SEND_CONT (0)
|
||||
#define CURLPAUSE_SEND_CONT 0
|
||||
|
||||
#define CURLPAUSE_ALL (CURLPAUSE_RECV | CURLPAUSE_SEND)
|
||||
#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT)
|
||||
|
||||
@ -329,7 +329,7 @@ curl_multi_socket_all(CURLM *multi_handle, int *running_handles);
|
||||
/* This macro below was added in 7.16.3 to push users who recompile to use
|
||||
* the new curl_multi_socket_action() instead of the old curl_multi_socket()
|
||||
*/
|
||||
#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z)
|
||||
#define curl_multi_socket(x, y, z) curl_multi_socket_action(x, y, 0, z)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@ -1234,7 +1234,7 @@ typedef unsigned int curl_bit;
|
||||
#elif defined(_WIN32) || defined(__CYGWIN__)
|
||||
#define CURL_BINMODE(stream) (void)_setmode(fileno(stream), CURL_O_BINARY)
|
||||
#else
|
||||
#define CURL_BINMODE(stream) (void)stream
|
||||
#define CURL_BINMODE(stream) (void)(stream)
|
||||
#endif
|
||||
|
||||
/* In Windows the default file mode is text but an application can override it.
|
||||
|
||||
@ -54,9 +54,9 @@ CURLcode Curl_headers_push(struct Curl_easy *data, const char *header,
|
||||
CURLcode Curl_headers_cleanup(struct Curl_easy *data);
|
||||
|
||||
#else
|
||||
#define Curl_headers_init(x) CURLE_OK
|
||||
#define Curl_headers_push(x,y,z,a) CURLE_OK
|
||||
#define Curl_headers_cleanup(x) Curl_nop_stmt
|
||||
#define Curl_headers_init(x) CURLE_OK
|
||||
#define Curl_headers_push(x, y, z, a) CURLE_OK
|
||||
#define Curl_headers_cleanup(x) Curl_nop_stmt
|
||||
#endif
|
||||
|
||||
#endif /* HEADER_CURL_HEADER_H */
|
||||
|
||||
@ -167,7 +167,7 @@ CURLcode Curl_creader_set_mime(struct Curl_easy *data, curl_mimepart *part);
|
||||
#define Curl_mime_set_subparts(a, b, c) CURLE_NOT_BUILT_IN
|
||||
#define Curl_mime_prepare_headers(a, b, c, d, e) CURLE_NOT_BUILT_IN
|
||||
#define Curl_mime_read NULL
|
||||
#define Curl_creader_set_mime(x, y) ((void)x, CURLE_NOT_BUILT_IN)
|
||||
#define Curl_creader_set_mime(x, y) ((void)(x), CURLE_NOT_BUILT_IN)
|
||||
#endif
|
||||
|
||||
#endif /* HEADER_CURL_MIME_H */
|
||||
|
||||
@ -30,9 +30,9 @@ CURLcode Curl_rand_bytes(struct Curl_easy *data,
|
||||
unsigned char *rnd, size_t num);
|
||||
|
||||
#ifdef DEBUGBUILD
|
||||
#define Curl_rand(a, b, c) Curl_rand_bytes((a), TRUE, (b), (c))
|
||||
#define Curl_rand(a, b, c) Curl_rand_bytes(a, TRUE, b, c)
|
||||
#else
|
||||
#define Curl_rand(a, b, c) Curl_rand_bytes((a), (b), (c))
|
||||
#define Curl_rand(a, b, c) Curl_rand_bytes(a, b, c)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
20
lib/select.h
20
lib/select.h
@ -161,22 +161,22 @@ CURLcode Curl_pollset_set(struct Curl_easy *data,
|
||||
bool do_in, bool do_out) WARN_UNUSED_RESULT;
|
||||
|
||||
#define Curl_pollset_add_in(data, ps, sock) \
|
||||
Curl_pollset_change((data), (ps), (sock), CURL_POLL_IN, 0)
|
||||
Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
|
||||
#define Curl_pollset_remove_in(data, ps, sock) \
|
||||
Curl_pollset_change((data), (ps), (sock), 0, CURL_POLL_IN)
|
||||
Curl_pollset_change(data, ps, sock, 0, CURL_POLL_IN)
|
||||
#define Curl_pollset_add_out(data, ps, sock) \
|
||||
Curl_pollset_change((data), (ps), (sock), CURL_POLL_OUT, 0)
|
||||
Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, 0)
|
||||
#define Curl_pollset_remove_out(data, ps, sock) \
|
||||
Curl_pollset_change((data), (ps), (sock), 0, CURL_POLL_OUT)
|
||||
Curl_pollset_change(data, ps, sock, 0, CURL_POLL_OUT)
|
||||
#define Curl_pollset_add_inout(data, ps, sock) \
|
||||
Curl_pollset_change((data), (ps), (sock), \
|
||||
CURL_POLL_IN | CURL_POLL_OUT, 0)
|
||||
Curl_pollset_change(data, ps, sock, \
|
||||
CURL_POLL_IN | CURL_POLL_OUT, 0)
|
||||
#define Curl_pollset_set_in_only(data, ps, sock) \
|
||||
Curl_pollset_change((data), (ps), (sock), \
|
||||
CURL_POLL_IN, CURL_POLL_OUT)
|
||||
Curl_pollset_change(data, ps, sock, \
|
||||
CURL_POLL_IN, CURL_POLL_OUT)
|
||||
#define Curl_pollset_set_out_only(data, ps, sock) \
|
||||
Curl_pollset_change((data), (ps), (sock), \
|
||||
CURL_POLL_OUT, CURL_POLL_IN)
|
||||
Curl_pollset_change(data, ps, sock, \
|
||||
CURL_POLL_OUT, CURL_POLL_IN)
|
||||
|
||||
/* return < = on error, 0 on timeout or how many sockets are ready */
|
||||
int Curl_pollset_poll(struct Curl_easy *data,
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
#include <stdio.h> /* Be sure it is loaded. */
|
||||
#undef puts
|
||||
#define puts(s) (fputs((s), stdout) == EOF ? EOF : putchar('\n'))
|
||||
#define puts(s) (fputs(s, stdout) == EOF ? EOF : putchar('\n'))
|
||||
|
||||
/* System API wrapper prototypes & definitions to support ASCII parameters. */
|
||||
|
||||
|
||||
@ -257,7 +257,7 @@ extern struct Curl_cftype Curl_cft_ssl_proxy;
|
||||
#define Curl_ssl_set_engine_default(x) CURLE_NOT_BUILT_IN
|
||||
#define Curl_ssl_engines_list(x) NULL
|
||||
#define Curl_ssl_free_certinfo(x) Curl_nop_stmt
|
||||
#define Curl_ssl_random(x, y, z) ((void)x, CURLE_NOT_BUILT_IN)
|
||||
#define Curl_ssl_random(x, y, z) ((void)(x), CURLE_NOT_BUILT_IN)
|
||||
#define Curl_ssl_cert_status_request() FALSE
|
||||
#define Curl_ssl_supports(a, b) FALSE
|
||||
#define Curl_ssl_cfilter_add(a, b, c) CURLE_NOT_BUILT_IN
|
||||
|
||||
Loading…
Reference in New Issue
Block a user