summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-05-14 15:53:11 -0400
committerAdam Jackson <ajax@redhat.com>2008-05-14 15:53:11 -0400
commit2efe1abb6fc786a4f86464978ae0d23fc7347a98 (patch)
treea06dd6b79df15f75c67f072af58e75a4728d9f6d
parent6c27b911222cdee9a057de0be7e8b2eff8b1ff2a (diff)
Remove global argc/argv variables.
Was only used in the logging code anymore, and uselessly so there.
-rw-r--r--dix/globals.c2
-rw-r--r--dix/main.c5
-rw-r--r--include/opaque.h2
-rw-r--r--os/log.c12
4 files changed, 3 insertions, 18 deletions
diff --git a/dix/globals.c b/dix/globals.c
index 2fb7ba0b3..3f12916e0 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 8bdfb5b7d..855050950 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 3d19d275f..d5abcbd50 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 8c579fd0c..2a59a00b3 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;
}