diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bad144/bad144.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bad144/bad144.c b/usr.sbin/bad144/bad144.c index 628b80d..a1b402a 100644 --- a/usr.sbin/bad144/bad144.c +++ b/usr.sbin/bad144/bad144.c @@ -133,7 +133,7 @@ bad_scan(argc, argv, dp, f, bstart, bend) * If we do, we may have to read twice over the block to find * exactly which one failed, and it may not fail second time. */ - for (curr_sec = bstart; curr_sec < bend; curr_sec++) { + for (curr_sec = bstart; curr_sec < size; curr_sec++) { if (verbose) { if ((curr_sec % spc) == 0) @@ -349,9 +349,9 @@ usage: while (argc > 0) { sn = atoi(*argv++); argc--; - if (sn < 0 || sn >= size) { + if (sn < 0 || sn >= bend) { printf("%ld: out of range [0,%ld) for disk %s\n", - sn, size, dp->d_typename); + sn, bend, dp->d_typename); errs++; continue; } |