]> granicus.if.org Git - sudo/commitdiff
Define YYDEBUG to 0 if not already defined so we can protect use
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 27 Feb 2015 14:10:20 +0000 (07:10 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 27 Feb 2015 14:10:20 +0000 (07:10 -0700)
of sudoersdebug with "#if YYDEBUG" like the generated parser does.
From David Michael.

plugins/sudoers/testsudoers.c

index 2b6a5f26b1fd2685d33af99ffbbc1930ad84c214..3006d5ae613598cc9abf2c634f0ac141f08823d1 100644 (file)
 # include "compat/fnmatch.h"
 #endif /* HAVE_FNMATCH */
 
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
 /*
  * Function Prototypes
  */
@@ -106,7 +110,7 @@ static char *runas_group, *runas_user;
 #if defined(SUDO_DEVEL) && defined(__OpenBSD__)
 extern char *malloc_options;
 #endif
-#ifdef YYDEBUG
+#if YYDEBUG
 extern int sudoersdebug;
 #endif
 
@@ -127,7 +131,7 @@ main(int argc, char *argv[])
 #if defined(SUDO_DEVEL) && defined(__OpenBSD__)
     malloc_options = "AFGJPR";
 #endif
-#ifdef YYDEBUG
+#if YYDEBUG
     sudoersdebug = 1;
 #endif