OsInit: store "/dev/null" in a const char *

It's only passed as the input side of a strcpy and as the filename to
fopen, so doesn't need to be non-const.   Fixes gcc warning:

osinit.c: In function 'OsInit':
osinit.c:154:28: warning: initialization discards qualifiers from pointer target type

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Alan Coopersmith 2011-12-12 16:49:33 -08:00
parent 50b1097643
commit 2c9800f915

View File

@ -151,7 +151,7 @@ void
OsInit(void) OsInit(void)
{ {
static Bool been_here = FALSE; static Bool been_here = FALSE;
static char* devnull = "/dev/null"; static const char* devnull = "/dev/null";
char fname[PATH_MAX]; char fname[PATH_MAX];
if (!been_here) { if (!been_here) {