dmx: Fix a non-constant printf format string warning.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Jamey Sharp 2010-05-21 14:21:52 -07:00
parent d8d99e14b1
commit d423012e77

View File

@ -429,11 +429,11 @@ static int kbdLinuxOpenVT(int vtno)
{
int fd = -1;
int i;
const char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL };
const char *vcs[] = { "/dev/vc/", "/dev/tty", NULL };
char name[64]; /* RATS: Only used in XmuSnprintf */
for (i = 0; vcs[i]; i++) {
XmuSnprintf(name, sizeof(name), vcs[i], vtno);
XmuSnprintf(name, sizeof(name), "%s%d", vcs[i], vtno);
if ((fd = open(name, O_RDWR | O_NONBLOCK, 0)) >= 0) break;
}
if (fd < 0)