dd: code shrink
function old new delta dd_main 1487 1475 -12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
f3114a3bd0
commit
1b57fe108f
@ -363,13 +363,13 @@ int dd_main(int argc UNUSED_PARAM, char **argv)
|
||||
}
|
||||
if (skip) {
|
||||
if (lseek(ifd, skip * ibs, SEEK_CUR) < 0) {
|
||||
while (skip-- > 0) {
|
||||
do {
|
||||
ssize_t n = safe_read(ifd, ibuf, ibs);
|
||||
if (n < 0)
|
||||
goto die_infile;
|
||||
if (n == 0)
|
||||
break;
|
||||
}
|
||||
} while (--skip != 0);
|
||||
}
|
||||
}
|
||||
if (seek) {
|
||||
|
Loading…
Reference in New Issue
Block a user