diff --git a/etc/uncrustify-small.cfg b/etc/uncrustify-small.cfg index 7ba3ae7ac..61bf22d43 100644 --- a/etc/uncrustify-small.cfg +++ b/etc/uncrustify-small.cfg @@ -341,6 +341,3 @@ pp_space = force # ignore/add/remove/force # Sets the number of spaces per level added with pp_space. pp_space_count = 1 # unsigned number - -# Whether to ignore the '#define' body while formatting. -pp_ignore_define_body = true # true/false diff --git a/etc/uncrustify.cfg b/etc/uncrustify.cfg index f21757af4..c4ad29abd 100644 --- a/etc/uncrustify.cfg +++ b/etc/uncrustify.cfg @@ -2917,7 +2917,7 @@ pp_if_indent_code = false # true/false pp_define_at_level = false # true/false # Whether to ignore the '#define' body while formatting. -pp_ignore_define_body = true # true/false +pp_ignore_define_body = false # true/false # Whether to indent case statements between #if, #else, and #endif. # Only applies to the indent of the preprocesser that the case statements diff --git a/plugins/python/regress/testhelpers.h b/plugins/python/regress/testhelpers.h index 360b4a574..b5abb9921 100644 --- a/plugins/python/regress/testhelpers.h +++ b/plugins/python/regress/testhelpers.h @@ -75,8 +75,9 @@ char ** create_str_array(size_t count, ...); printf("FAILED: deitialization of testcase %s at %s:%d\n", #testcase, __FILE__, __LINE__); \ success = 0; \ } \ - if (!success) \ + if (!success) { \ errors++; \ + } \ } while(false) #define VERIFY_PRINT_MSG(fmt, actual_str, actual, expected_str, expected, expected_to_be_message) \ diff --git a/plugins/sudoers/env.c b/plugins/sudoers/env.c index b2d59fcbe..b5214148e 100644 --- a/plugins/sudoers/env.c +++ b/plugins/sudoers/env.c @@ -860,13 +860,15 @@ env_update_didvar(const char *ep, unsigned int *didvar) } #define CHECK_PUTENV(a, b, c) do { \ - if (sudo_putenv((a), (b), (c)) == -1) \ + if (sudo_putenv((a), (b), (c)) == -1) { \ goto bad; \ + } \ } while (0) #define CHECK_SETENV2(a, b, c, d) do { \ - if (sudo_setenv2((a), (b), (c), (d)) == -1) \ + if (sudo_setenv2((a), (b), (c), (d)) == -1) { \ goto bad; \ + } \ } while (0) /* diff --git a/plugins/sudoers/sudo_ldap_conf.h b/plugins/sudoers/sudo_ldap_conf.h index d0b4fd675..a5a4da1b9 100644 --- a/plugins/sudoers/sudo_ldap_conf.h +++ b/plugins/sudoers/sudo_ldap_conf.h @@ -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