mirror of
https://github.com/curl/curl.git
synced 2026-07-27 19:09:01 +03:00
tidy-up: avoid (()), clang-format fixes and more
- drop redundant parentheses from macro definitions. - apply clang-format in some places missed earlier. - wolfssl: fix a macro guard comment. - curl_setup.h: drop empty lines - FAQ: fix C formatting. Closes #19854
This commit is contained in:
parent
4e051ff550
commit
af5def0738
13 changed files with 404 additions and 374 deletions
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
char *tool_basename(char *path);
|
||||
|
||||
#define basename(x) tool_basename((x))
|
||||
#define basename(x) tool_basename(x)
|
||||
|
||||
#endif /* HAVE_BASENAME */
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include "tool_msgs.h"
|
||||
|
||||
#if defined(_WIN32) || (defined(MSDOS) && !defined(__DJGPP__))
|
||||
# define mkdir(x, y) (mkdir)((x))
|
||||
# define mkdir(x, y) (mkdir)(x)
|
||||
# ifndef F_OK
|
||||
# define F_OK 0
|
||||
# endif
|
||||
|
|
|
|||
|
|
@ -381,15 +381,15 @@ ParameterError parse_args(int argc, argv_item_t argv[]);
|
|||
|
||||
#if defined(UNICODE) && defined(_WIN32)
|
||||
|
||||
#define convert_UTF8_to_tchar(ptr) curlx_convert_UTF8_to_wchar((ptr))
|
||||
#define convert_tchar_to_UTF8(ptr) curlx_convert_wchar_to_UTF8((ptr))
|
||||
#define convert_UTF8_to_tchar(ptr) curlx_convert_UTF8_to_wchar(ptr)
|
||||
#define convert_tchar_to_UTF8(ptr) curlx_convert_wchar_to_UTF8(ptr)
|
||||
#define unicodefree(ptr) curlx_free(ptr)
|
||||
|
||||
#else
|
||||
|
||||
#define convert_UTF8_to_tchar(ptr) (const char *)(ptr)
|
||||
#define convert_tchar_to_UTF8(ptr) (const char *)(ptr)
|
||||
#define unicodefree(ptr) do {} while(0)
|
||||
#define unicodefree(ptr) do {} while(0)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue