aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86Config.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-16 20:45:15 +0100
committerMarc Haesen <marc@hc-consult.be>2011-12-16 20:45:15 +0100
commit47913e82955ec8e2b1ba4d4b145497dede9163b5 (patch)
treed23c322caf26864270171d54eb2805cee2721e4d /xorg-server/hw/xfree86/common/xf86Config.c
parent53d28537755790ee4625dc16f560cad5aa93f56b (diff)
downloadvcxsrv-47913e82955ec8e2b1ba4d4b145497dede9163b5.tar.gz
vcxsrv-47913e82955ec8e2b1ba4d4b145497dede9163b5.tar.bz2
vcxsrv-47913e82955ec8e2b1ba4d4b145497dede9163b5.zip
xserver git update 16 dec 2011
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Config.c')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Config.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c
index fef4bf1fe..569695c8a 100644
--- a/xorg-server/hw/xfree86/common/xf86Config.c
+++ b/xorg-server/hw/xfree86/common/xf86Config.c
@@ -552,7 +552,7 @@ xf86DriverlistFromCompile(void)
* Print a READABLE ErrorMessage!!! All information that is
* available is printed.
*/
-static void
+static void _X_ATTRIBUTE_PRINTF(1,2)
xf86ConfigError(const char *msg, ...)
{
va_list ap;
@@ -2300,15 +2300,16 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout) {
ConfigStatus
xf86HandleConfigFile(Bool autoconfig)
{
- char *filename, *dirname, *sysdirname;
- const char *filesearch, *dirsearch;
- MessageType filefrom = X_DEFAULT;
- MessageType dirfrom = X_DEFAULT;
char *scanptr;
Bool singlecard = 0;
Bool implicit_layout = FALSE;
if (!autoconfig) {
+ char *filename, *dirname, *sysdirname;
+ const char *filesearch, *dirsearch;
+ MessageType filefrom = X_DEFAULT;
+ MessageType dirfrom = X_DEFAULT;
+
if (getuid() == 0) {
filesearch = ROOT_CONFIGPATH;
dirsearch = ROOT_CONFIGDIRPATH;
@@ -2350,11 +2351,11 @@ xf86HandleConfigFile(Bool autoconfig)
sysdirname);
if (!filename && !dirname && !sysdirname)
return CONFIG_NOFILE;
- }
- free(filename);
- free(dirname);
- free(sysdirname);
+ free(filename);
+ free(dirname);
+ free(sysdirname);
+ }
if ((xf86configptr = xf86readConfigFile ()) == NULL) {
xf86Msg(X_ERROR, "Problem parsing the config file\n");