summaryrefslogtreecommitdiff
path: root/console-tools/deallocvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'console-tools/deallocvt.c')
-rw-r--r--console-tools/deallocvt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c
index a69026664..bf2bac186 100644
--- a/console-tools/deallocvt.c
+++ b/console-tools/deallocvt.c
@@ -23,7 +23,7 @@ int deallocvt_main(int argc, char **argv)
23 23
24 switch (argc) { 24 switch (argc) {
25 case 2: 25 case 2:
26 num = xatoul_range(argv[1], 1, 63); 26 num = xatou_range(argv[1], 1, 63);
27 /* Fallthrough */ 27 /* Fallthrough */
28 case 1: 28 case 1:
29 break; 29 break;
@@ -31,6 +31,7 @@ int deallocvt_main(int argc, char **argv)
31 bb_show_usage(); 31 bb_show_usage();
32 } 32 }
33 33
34 xioctl(get_console_fd(), VT_DISALLOCATE, (void *)num); 34 /* double cast suppresses "cast to ptr from int of different size */
35 xioctl(get_console_fd(), VT_DISALLOCATE, (void *)(ptrdiff_t)num);
35 return EXIT_SUCCESS; 36 return EXIT_SUCCESS;
36} 37}