[PATCH 11/19] xfree86: Remove spurious xf86ConfigError

Adam Jackson ajax at redhat.com
Thu Sep 25 10:37:27 PDT 2014


READABLE.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xfree86/common/xf86Config.c | 48 +++++++++++-------------------------------
 1 file changed, 12 insertions(+), 36 deletions(-)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 53e61a0..546055d 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -571,25 +571,6 @@ xf86DriverlistFromCompile(void)
     return driverlist;
 }
 
-/*
- * xf86ConfigError --
- *      Print a READABLE ErrorMessage!!!  All information that is 
- *      available is printed.
- */
-static void
-_X_ATTRIBUTE_PRINTF(1, 2)
-xf86ConfigError(const char *msg, ...)
-{
-    va_list ap;
-
-    ErrorF("\nConfig Error:\n");
-    va_start(ap, msg);
-    VErrorF(msg, ap);
-    va_end(ap);
-    ErrorF("\n");
-    return;
-}
-
 static void
 configFiles(XF86ConfFilesPtr fileconf)
 {
@@ -994,9 +975,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
     if ((i >= 0) && (i < MAX_TIME_IN_MIN))
         ScreenSaverTime = defaultScreenSaverTime = i * MILLI_PER_MIN;
     else if (i != -1)
-        xf86ConfigError
-            ("BlankTime value %d outside legal range of 0 - %d minutes", i,
-             MAX_TIME_IN_MIN);
+        ErrorF("BlankTime value %d outside legal range of 0 - %d minutes\n",
+               i, MAX_TIME_IN_MIN);
 
 #ifdef DPMSExtension
     i = -1;
@@ -1004,25 +984,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
     if ((i >= 0) && (i < MAX_TIME_IN_MIN))
         DPMSStandbyTime = i * MILLI_PER_MIN;
     else if (i != -1)
-        xf86ConfigError
-            ("StandbyTime value %d outside legal range of 0 - %d minutes", i,
-             MAX_TIME_IN_MIN);
+        ErrorF("StandbyTime value %d outside legal range of 0 - %d minutes\n",
+               i, MAX_TIME_IN_MIN);
     i = -1;
     xf86GetOptValInteger(FlagOptions, FLAG_DPMS_SUSPENDTIME, &i);
     if ((i >= 0) && (i < MAX_TIME_IN_MIN))
         DPMSSuspendTime = i * MILLI_PER_MIN;
     else if (i != -1)
-        xf86ConfigError
-            ("SuspendTime value %d outside legal range of 0 - %d minutes", i,
-             MAX_TIME_IN_MIN);
+        ErrorF("SuspendTime value %d outside legal range of 0 - %d minutes\n",
+               i, MAX_TIME_IN_MIN);
     i = -1;
     xf86GetOptValInteger(FlagOptions, FLAG_DPMS_OFFTIME, &i);
     if ((i >= 0) && (i < MAX_TIME_IN_MIN))
         DPMSOffTime = i * MILLI_PER_MIN;
     else if (i != -1)
-        xf86ConfigError
-            ("OffTime value %d outside legal range of 0 - %d minutes", i,
-             MAX_TIME_IN_MIN);
+        ErrorF("OffTime value %d outside legal range of 0 - %d minutes\n",
+               i, MAX_TIME_IN_MIN);
 #endif
 
     i = -1;
@@ -1037,7 +1014,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
     case -1:
         break;
     default:
-        xf86ConfigError("Pixmap option's value (%d) must be 24 or 32\n", i);
+        ErrorF("Pixmap option's value (%d) must be 24 or 32\n", i);
         return FALSE;
     }
     if (xf86Pix24 != Pix24DontCare) {
@@ -2049,8 +2026,8 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor)
         badgamma = monitorp->gamma.blue;
     }
     if (badgamma > GAMMA_ZERO) {
-        xf86ConfigError("Gamma value %.f is out of range (%.2f - %.1f)\n",
-                        badgamma, GAMMA_MIN, GAMMA_MAX);
+        ErrorF("Gamma value %.f is out of range (%.2f - %.1f)\n", badgamma,
+               GAMMA_MIN, GAMMA_MAX);
         return FALSE;
     }
 
@@ -2109,8 +2086,7 @@ configDisplay(DispPtr displayp, XF86ConfDisplayPtr conf_display)
     if (conf_display->disp_visual) {
         displayp->defaultVisual = lookupVisual(conf_display->disp_visual);
         if (displayp->defaultVisual == -1) {
-            xf86ConfigError("Invalid visual name: \"%s\"",
-                            conf_display->disp_visual);
+            ErrorF("Invalid visual name: \"%s\"\n", conf_display->disp_visual);
             return FALSE;
         }
     }
-- 
1.9.3



More information about the xorg-devel mailing list