From ff2b4cf8329b1678adafcda02e5d47a072550d47 Mon Sep 17 00:00:00 2001 From: Mikhail Gusarov Date: Thu, 13 May 2010 01:51:37 +0700 Subject: [PATCH] Turn sprintf argument into literaral string, shutting up gcc warning Signed-off-by: Mikhail Gusarov Reviewed-by: Matt Turner --- os/osinit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/os/osinit.c b/os/osinit.c index e8fcd4540..32747df52 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); /*