diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-05-13 01:51:37 +0700 |
---|---|---|
committer | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-05-13 04:53:57 +0700 |
commit | ff2b4cf8329b1678adafcda02e5d47a072550d47 (patch) | |
tree | dd9177522a836b73ed482944b5eaaaf02fa64f07 /os | |
parent | f62ba192c285b1e49bf299f03fc0b763680afaaf (diff) |
Turn sprintf argument into literaral string, shutting up gcc warning
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'os')
-rw-r--r-- | os/osinit.c | 5 |
1 files 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); /* |