← Commit list

f3114a3bd

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

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+6 -5
@@ -440,8 +440,10 @@ int dd_main(int argc UNUSED_PARAM, char **argv)
oc = 0;
}
}
- } else if (write_and_stats(ibuf, n, obs, outfile))
- goto out_status;
+ } else {
+ if (write_and_stats(ibuf, n, obs, outfile))
+ goto out_status;
+ }
if (flags & FLAG_FSYNC) {
if (fsync(ofd) < 0)
@@ -450,9 +452,8 @@ int dd_main(int argc UNUSED_PARAM, char **argv)
}
if (ENABLE_FEATURE_DD_IBS_OBS && oc) {
- ssize_t w = full_write_or_warn(obuf, oc, outfile);
- if (w < 0) goto out_status;
- if (w > 0) G.out_part++;
+ if (write_and_stats(obuf, oc, obs, outfile))
+ goto out_status;
}
if (close(ifd) < 0) {
die_infile: