const char *p;
int prec;
- /* figure out the data block bb_dump_size needed for each format unit */
+ /* figure out the data block size needed for each format unit */
for (cur_size = 0, fu = fs->nextfu; fu; fu = fu->nextfu) {
if (fu->bcnt) {
cur_size += fu->bcnt * fu->reps;
if (!(S_ISCHR(sbuf.st_mode) || S_ISBLK(sbuf.st_mode) || S_ISFIFO(sbuf.st_mode))
&& dumper->pub.dump_skip >= sbuf.st_size
) {
- /* If bb_dump_size valid and pub.dump_skip >= size */
+ /* If st_size is valid and pub.dump_skip >= st_size */
dumper->pub.dump_skip -= sbuf.st_size;
dumper->address += sbuf.st_size;
return;
int statok;
for (;;) {
- if (*dumper->argv) {
+ char *fname = *dumper->argv;
+
+ if (fname) {
+ dumper->argv++;
dumper->next__done = statok = 1;
- if (!(freopen(*dumper->argv, "r", stdin))) {
- bb_simple_perror_msg(*dumper->argv);
+ if (!freopen(fname, "r", stdin)) {
+ bb_simple_perror_msg(fname);
dumper->exitval = 1;
- ++dumper->argv;
continue;
}
} else {
statok = 0;
}
if (dumper->pub.dump_skip)
- do_skip(dumper, statok ? *dumper->argv : "stdin", statok);
- if (*dumper->argv)
- ++dumper->argv;
+ do_skip(dumper, statok ? fname : "stdin", statok);
if (!dumper->pub.dump_skip)
return 1;
}
FS *tfs;
int blocksize;
- /* figure out the data block bb_dump_size */
+ /* figure out the data block size */
blocksize = 0;
tfs = dumper->pub.fshead;
while (tfs) {