aboutsummaryrefslogtreecommitdiff
path: root/console-tools/deallocvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'console-tools/deallocvt.c')
-rw-r--r--console-tools/deallocvt.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c
index 117224560..1200cae1d 100644
--- a/console-tools/deallocvt.c
+++ b/console-tools/deallocvt.c
@@ -16,19 +16,15 @@
16enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */ 16enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */
17 17
18int deallocvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 18int deallocvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
19int deallocvt_main(int argc, char **argv) 19int deallocvt_main(int argc ATTRIBUTE_UNUSED, char **argv)
20{ 20{
21 /* num = 0 deallocate all unused consoles */ 21 /* num = 0 deallocate all unused consoles */
22 int num = 0; 22 int num = 0;
23 23
24 switch (argc) { 24 if (argv[1]) {
25 case 2: 25 if (argv[2])
26 bb_show_usage();
26 num = xatou_range(argv[1], 1, 63); 27 num = xatou_range(argv[1], 1, 63);
27 /* Fallthrough */
28 case 1:
29 break;
30 default:
31 bb_show_usage();
32 } 28 }
33 29
34 /* double cast suppresses "cast to ptr from int of different size" */ 30 /* double cast suppresses "cast to ptr from int of different size" */