[PATCH xserver 1/4] fbdevhw: Fix inconsistent #if DEBUG usage

Lyude Paul lyude at redhat.com
Fri Oct 13 19:44:29 UTC 2017


fbdevhw is the only file in X's source that actually uses #if DEBUG to
check for debugging instead of #ifdef DEBUG. This is contrary to
everything else that checks the DEBUG macro in the source, so let's make
it consistent and in turn, make our meson files a little simpler.

Signed-off-by: Lyude Paul <lyude at redhat.com>
---
 hw/xfree86/fbdevhw/fbdevhw.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index b50ae5ed2..0bd77df87 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -120,7 +120,7 @@ fbdevHWGetFD(ScrnInfoPtr pScrn)
 /* -------------------------------------------------------------------- */
 /* some helpers for printing debug informations                         */
 
-#if DEBUG
+#ifdef DEBUG
 static void
 print_fbdev_mode(const char *txt, struct fb_var_screeninfo *var)
 {
@@ -466,7 +466,7 @@ fbdevHWSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool check)
     xfree2fbdev_fblayout(pScrn, &req_var);
     xfree2fbdev_timing(mode, &req_var);
 
-#if DEBUG
+#ifdef DEBUG
     print_xfree_mode("init", mode);
     print_fbdev_mode("init", &req_var);
 #endif
@@ -486,7 +486,7 @@ fbdevHWSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool check)
         if (!check)
             xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
                        "FBIOPUT_VSCREENINFO succeeded but modified " "mode\n");
-#if DEBUG
+#ifdef DEBUG
         print_fbdev_mode("returned", &set_var);
 #endif
         return FALSE;
-- 
2.13.6



More information about the xorg-devel mailing list