aboutsummaryrefslogtreecommitdiff
path: root/console-tools/chvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'console-tools/chvt.c')
-rw-r--r--console-tools/chvt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/console-tools/chvt.c b/console-tools/chvt.c
index 86d3f2ddb..b1f81a20e 100644
--- a/console-tools/chvt.c
+++ b/console-tools/chvt.c
@@ -25,8 +25,9 @@ int chvt_main(int argc, char **argv)
25 } 25 }
26 26
27 fd = get_console_fd(); 27 fd = get_console_fd();
28 num = xatoul_range(argv[1], 1, 63); 28 num = xatou_range(argv[1], 1, 63);
29 xioctl(fd, VT_ACTIVATE, (void *)num); 29 /* double cast suppresses "cast to ptr from int of different size */
30 xioctl(fd, VT_WAITACTIVE, (void *)num); 30 xioctl(fd, VT_ACTIVATE, (void *)(ptrdiff_t)num);
31 xioctl(fd, VT_WAITACTIVE, (void *)(ptrdiff_t)num);
31 return EXIT_SUCCESS; 32 return EXIT_SUCCESS;
32} 33}