projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3114a3
)
dd: code shrink
author
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 20 Aug 2013 10:45:05 +0000
(12:45 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 20 Aug 2013 10:45:05 +0000
(12:45 +0200)
function old new delta
dd_main 1487 1475 -12
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/dd.c
patch
|
blob
|
history
diff --git
a/coreutils/dd.c
b/coreutils/dd.c
index e046ff5ccacc7faa950a89ca28473e227803be0f..9299f58bcb197a38ba6a96e1088a892f43268757 100644
(file)
--- a/
coreutils/dd.c
+++ b/
coreutils/dd.c
@@
-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) {