← Commit list

1b57fe108

Denys Vlasenko
Denys Vlasenko
2013-08-20
SUCCESS Duration: 180s

Subject

dd: code shrink

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/dd.c+2 -2
@@ -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) {