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:
Denys Vlasenko 2013-08-20 12:45:05 +02:00
parent f3114a3bd0
commit 1b57fe108f

View File

@ -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) {