[PATCH 2/5] Turn sprintf argument into literaral string, shutting up gcc warning
Mikhail Gusarov
dottedmag at dottedmag.net
Wed May 12 13:33:11 PDT 2010
Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
---
os/osinit.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/os/osinit.c b/os/osinit.c
index e8fcd45..32747df 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -161,7 +161,6 @@ void
OsInit(void)
{
static Bool been_here = FALSE;
- static char* admpath = ADMPATH;
static char* devnull = "/dev/null";
char fname[PATH_MAX];
@@ -229,8 +228,8 @@ OsInit(void)
{
FILE *err;
- if (strlen (display) + strlen (admpath) + 1 < sizeof fname)
- sprintf (fname, admpath, display);
+ if (strlen (display) + strlen (ADMPATH) + 1 < sizeof fname)
+ sprintf (fname, ADMPATH, display);
else
strcpy (fname, devnull);
/*
--
1.7.1
More information about the xorg-devel
mailing list