Set pp_ignore_define_body=false in uncrustify config.
Need to work around a bug that produces closed brace errors, see https://github.com/uncrustify/uncrustify/issues/2569
This commit is contained in:
@@ -21,39 +21,46 @@
|
||||
|
||||
/* Macros for checking strlcpy/strlcat/sudo_ldap_value_cat return value. */
|
||||
#define CHECK_STRLCPY(d, s, l) do { \
|
||||
if (strlcpy((d), (s), (l)) >= (l)) \
|
||||
if (strlcpy((d), (s), (l)) >= (l)) { \
|
||||
goto overflow; \
|
||||
} \
|
||||
} while (0)
|
||||
#define CHECK_STRLCAT(d, s, l) do { \
|
||||
if (strlcat((d), (s), (l)) >= (l)) \
|
||||
if (strlcat((d), (s), (l)) >= (l)) { \
|
||||
goto overflow; \
|
||||
} \
|
||||
} while (0)
|
||||
#define CHECK_LDAP_VCAT(d, s, l) do { \
|
||||
if (sudo_ldap_value_cat((d), (s), (l)) >= (l)) \
|
||||
if (sudo_ldap_value_cat((d), (s), (l)) >= (l)) { \
|
||||
goto overflow; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ == 2
|
||||
# define DPRINTF1(fmt...) do { \
|
||||
sudo_debug_printf(SUDO_DEBUG_DIAG, fmt); \
|
||||
if (ldap_conf.debug >= 1) \
|
||||
if (ldap_conf.debug >= 1) { \
|
||||
sudo_warnx_nodebug(fmt); \
|
||||
} \
|
||||
} while (0)
|
||||
# define DPRINTF2(fmt...) do { \
|
||||
sudo_debug_printf(SUDO_DEBUG_INFO, fmt); \
|
||||
if (ldap_conf.debug >= 2) \
|
||||
if (ldap_conf.debug >= 2) { \
|
||||
sudo_warnx_nodebug(fmt); \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
# define DPRINTF1(...) do { \
|
||||
sudo_debug_printf(SUDO_DEBUG_DIAG, __VA_ARGS__); \
|
||||
if (ldap_conf.debug >= 1) \
|
||||
if (ldap_conf.debug >= 1) { \
|
||||
sudo_warnx_nodebug(__VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
# define DPRINTF2(...) do { \
|
||||
sudo_debug_printf(SUDO_DEBUG_INFO, __VA_ARGS__); \
|
||||
if (ldap_conf.debug >= 2) \
|
||||
if (ldap_conf.debug >= 2) { \
|
||||
sudo_warnx_nodebug(__VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user