aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/last.c4
-rw-r--r--miscutils/readahead.c6
-rw-r--r--miscutils/ttysize.c4
3 files changed, 8 insertions, 6 deletions
diff --git a/miscutils/last.c b/miscutils/last.c
index f8c301395..6e3ed9093 100644
--- a/miscutils/last.c
+++ b/miscutils/last.c
@@ -35,7 +35,7 @@
35#endif 35#endif
36 36
37int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 37int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
38int last_main(int argc, char **argv UNUSED_PARAM) 38int last_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
39{ 39{
40 struct utmp ut; 40 struct utmp ut;
41 int n, file = STDIN_FILENO; 41 int n, file = STDIN_FILENO;
@@ -56,7 +56,7 @@ int last_main(int argc, char **argv UNUSED_PARAM)
56 TYPE_OLD_TIME /* OLD_TIME, 4 */ 56 TYPE_OLD_TIME /* OLD_TIME, 4 */
57 }; 57 };
58 58
59 if (argc > 1) { 59 if (argv[1]) {
60 bb_show_usage(); 60 bb_show_usage();
61 } 61 }
62 file = xopen(bb_path_wtmp_file, O_RDONLY); 62 file = xopen(bb_path_wtmp_file, O_RDONLY);
diff --git a/miscutils/readahead.c b/miscutils/readahead.c
index fb71ce85f..f3b21a2fc 100644
--- a/miscutils/readahead.c
+++ b/miscutils/readahead.c
@@ -13,11 +13,13 @@
13#include "libbb.h" 13#include "libbb.h"
14 14
15int readahead_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 15int readahead_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
16int readahead_main(int argc, char **argv) 16int readahead_main(int argc UNUSED_PARAM, char **argv)
17{ 17{
18 int retval = EXIT_SUCCESS; 18 int retval = EXIT_SUCCESS;
19 19
20 if (argc == 1) bb_show_usage(); 20 if (!argv[1]) {
21 bb_show_usage();
22 }
21 23
22 while (*++argv) { 24 while (*++argv) {
23 int fd = open_or_warn(*argv, O_RDONLY); 25 int fd = open_or_warn(*argv, O_RDONLY);
diff --git a/miscutils/ttysize.c b/miscutils/ttysize.c
index 05455543d..ca9a2ec8d 100644
--- a/miscutils/ttysize.c
+++ b/miscutils/ttysize.c
@@ -12,7 +12,7 @@
12#include "libbb.h" 12#include "libbb.h"
13 13
14int ttysize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 14int ttysize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
15int ttysize_main(int argc, char **argv) 15int ttysize_main(int argc UNUSED_PARAM, char **argv)
16{ 16{
17 unsigned w, h; 17 unsigned w, h;
18 struct winsize wsz; 18 struct winsize wsz;
@@ -24,7 +24,7 @@ int ttysize_main(int argc, char **argv)
24 h = wsz.ws_row; 24 h = wsz.ws_row;
25 } 25 }
26 26
27 if (argc == 1) { 27 if (!argv[1]) {
28 printf("%u %u", w, h); 28 printf("%u %u", w, h);
29 } else { 29 } else {
30 const char *fmt, *arg; 30 const char *fmt, *arg;