xserver: Branch 'master'
Adam Jackson
ajax at kemper.freedesktop.org
Wed May 14 12:53:22 PDT 2008
dix/globals.c | 2 --
dix/main.c | 5 -----
include/opaque.h | 2 --
os/log.c | 12 +++---------
4 files changed, 3 insertions(+), 18 deletions(-)
New commits:
commit 2efe1abb6fc786a4f86464978ae0d23fc7347a98
Author: Adam Jackson <ajax at redhat.com>
Date: Wed May 14 15:53:11 2008 -0400
Remove global argc/argv variables.
Was only used in the logging code anymore, and uselessly so there.
diff --git a/dix/globals.c b/dix/globals.c
index 2fb7ba0..3f12916 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -153,7 +153,5 @@ _X_EXPORT int monitorResolution = 0;
_X_EXPORT char *display;
CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND;
-int argcGlobal;
-char **argvGlobal;
DDXPointRec dixScreenOrigins[MAXSCREENS];
diff --git a/dix/main.c b/dix/main.c
index 8bdfb5b..8550509 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -259,11 +259,6 @@ int main(int argc, char *argv[], char *envp[])
InitConnectionLimits();
- /* These are needed by some routines which are called from interrupt
- * handlers, thus have no direct calling path back to main and thus
- * can't be passed argc, argv as parameters */
- argcGlobal = argc;
- argvGlobal = argv;
/* prep X authority file from environment; this can be overriden by a
* command line option */
xauthfile = getenv("XAUTHORITY");
diff --git a/include/opaque.h b/include/opaque.h
index 3d19d27..d5abcbd 100644
--- a/include/opaque.h
+++ b/include/opaque.h
@@ -49,8 +49,6 @@ extern int ScreenSaverBlanking;
extern int ScreenSaverAllowExposures;
extern int defaultScreenSaverBlanking;
extern int defaultScreenSaverAllowExposures;
-extern int argcGlobal;
-extern char **argvGlobal;
extern char *display;
extern int defaultBackingStore;
diff --git a/os/log.c b/os/log.c
index 8c579fd..2a59a00 100644
--- a/os/log.c
+++ b/os/log.c
@@ -410,9 +410,7 @@ AbortServer(void)
exit (1);
}
-#ifndef AUDIT_PREFIX
-#define AUDIT_PREFIX "AUDIT: %s: %ld %s: "
-#endif
+#define AUDIT_PREFIX "AUDIT: %s: %ld: "
#ifndef AUDIT_TIMEOUT
#define AUDIT_TIMEOUT ((CARD32)(120 * 1000)) /* 2 mn */
#endif
@@ -444,15 +442,11 @@ AuditPrefix(void)
autime = ctime(&tm);
if ((s = strchr(autime, '\n')))
*s = '\0';
- if ((s = strrchr(argvGlobal[0], '/')))
- s++;
- else
- s = argvGlobal[0];
- len = strlen(AUDIT_PREFIX) + strlen(autime) + 10 + strlen(s) + 1;
+ len = strlen(AUDIT_PREFIX) + strlen(autime) + 10 + 1;
tmpBuf = malloc(len);
if (!tmpBuf)
return NULL;
- snprintf(tmpBuf, len, AUDIT_PREFIX, autime, (unsigned long)getpid(), s);
+ snprintf(tmpBuf, len, AUDIT_PREFIX, autime, (unsigned long)getpid());
return tmpBuf;
}
More information about the xorg-commit
mailing list