aboutsummaryrefslogtreecommitdiff
path: root/procps/mpstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'procps/mpstat.c')
-rw-r--r--procps/mpstat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/procps/mpstat.c b/procps/mpstat.c
index 7610a68fb..85cbb45db 100644
--- a/procps/mpstat.c
+++ b/procps/mpstat.c
@@ -930,14 +930,14 @@ int mpstat_main(int UNUSED_PARAM argc, char **argv)
930 930
931 if (*argv) { 931 if (*argv) {
932 /* Get interval */ 932 /* Get interval */
933 G.interval = xatoi_u(*argv); 933 G.interval = xatoi_positive(*argv);
934 G.count = -1; 934 G.count = -1;
935 argv++; 935 argv++;
936 if (*argv) { 936 if (*argv) {
937 /* Get count value */ 937 /* Get count value */
938 if (G.interval == 0) 938 if (G.interval == 0)
939 bb_show_usage(); 939 bb_show_usage();
940 G.count = xatoi_u(*argv); 940 G.count = xatoi_positive(*argv);
941 //if (*++argv) 941 //if (*++argv)
942 // bb_show_usage(); 942 // bb_show_usage();
943 } 943 }
@@ -979,7 +979,7 @@ int mpstat_main(int UNUSED_PARAM argc, char **argv)
979 memset(G.cpu_bitmap, 0xff, G.cpu_bitmap_len); 979 memset(G.cpu_bitmap, 0xff, G.cpu_bitmap_len);
980 } else { 980 } else {
981 /* Get CPU number */ 981 /* Get CPU number */
982 unsigned n = xatoi_u(t); 982 unsigned n = xatoi_positive(t);
983 if (n >= G.cpu_nr) 983 if (n >= G.cpu_nr)
984 bb_error_msg_and_die("not that many processors"); 984 bb_error_msg_and_die("not that many processors");
985 n++; 985 n++;