]> granicus.if.org Git - sudo/commitdiff
Fix old gcc2 variadic macro support.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 27 May 2015 22:38:59 +0000 (16:38 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 27 May 2015 22:38:59 +0000 (16:38 -0600)
plugins/sudoers/ldap.c

index 9817905a08fd2e1bab2c05fda35b95edd7186b66..c3a0d89fc0629c6c683470ee5d5762e7c6492496 100644 (file)
@@ -113,25 +113,25 @@ extern int ldapssl_set_strength(LDAP *ldap, int strength);
 
 #if defined(__GNUC__) && __GNUC__ == 2
 # define DPRINTF1(fmt...) do {                                         \
-    if (ldap_conf.debug >= 1)                                          \
-       sudo_warnx(__VA_ARGS__);                                                \
     sudo_debug_printf(SUDO_DEBUG_DIAG, fmt);                           \
+    if (ldap_conf.debug >= 1)                                          \
+       sudo_warnx_nodebug(fmt);                                        \
 } while (0)
 # define DPRINTF2(fmt...) do {                                         \
-    if (ldap_conf.debug >= 2)                                          \
-       sudo_warnx(__VA_ARGS__);                                                \
     sudo_debug_printf(SUDO_DEBUG_INFO, fmt);                           \
+    if (ldap_conf.debug >= 2)                                          \
+       sudo_warnx_nodebug(fmt);                                        \
 } while (0)
 #else
 # define DPRINTF1(...) do {                                            \
-    if (ldap_conf.debug >= 1)                                          \
-       sudo_warnx(__VA_ARGS__);                                                \
     sudo_debug_printf(SUDO_DEBUG_DIAG, __VA_ARGS__);                   \
+    if (ldap_conf.debug >= 1)                                          \
+       sudo_warnx_nodebug(__VA_ARGS__);                                \
 } while (0)
 # define DPRINTF2(...) do {                                            \
-    if (ldap_conf.debug >= 2)                                          \
-       sudo_warnx(__VA_ARGS__);                                                \
     sudo_debug_printf(SUDO_DEBUG_INFO, __VA_ARGS__);                   \
+    if (ldap_conf.debug >= 2)                                          \
+       sudo_warnx_nodebug(__VA_ARGS__);                                \
 } while (0)
 #endif