mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-30 07:20:08 +01:00
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:
parent
d8d99e14b1
commit
d423012e77
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue