aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-08-20 12:45:05 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2013-08-20 12:45:05 +0200
commit1b57fe108f082167fd85a5962769a941ba871dd4 (patch)
tree1b3d90f181d0e8a212d1e9e4b1bcc05b77c11667
parentf3114a3bd0d468a417e9e4a254d76ecf1cf35178 (diff)
downloadbusybox-w32-1b57fe108f082167fd85a5962769a941ba871dd4.tar.gz
busybox-w32-1b57fe108f082167fd85a5962769a941ba871dd4.tar.bz2
busybox-w32-1b57fe108f082167fd85a5962769a941ba871dd4.zip
dd: code shrink
function old new delta dd_main 1487 1475 -12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/dd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index e046ff5cc..9299f58bc 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -363,13 +363,13 @@ int dd_main(int argc UNUSED_PARAM, char **argv)
363 } 363 }
364 if (skip) { 364 if (skip) {
365 if (lseek(ifd, skip * ibs, SEEK_CUR) < 0) { 365 if (lseek(ifd, skip * ibs, SEEK_CUR) < 0) {
366 while (skip-- > 0) { 366 do {
367 ssize_t n = safe_read(ifd, ibuf, ibs); 367 ssize_t n = safe_read(ifd, ibuf, ibs);
368 if (n < 0) 368 if (n < 0)
369 goto die_infile; 369 goto die_infile;
370 if (n == 0) 370 if (n == 0)
371 break; 371 break;
372 } 372 } while (--skip != 0);
373 } 373 }
374 } 374 }
375 if (seek) { 375 if (seek) {