summaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
authorDenys Vlasenko2010-06-15 10:02:04 +0200
committerDenys Vlasenko2010-06-15 10:02:04 +0200
commitf7e929e795c433014f76e4be808776e6dc968cbc (patch)
tree1d6490a4ca46d0fde15319454d60a844c4f38e62 /findutils
parent1cd769a154b04f4b058beed482a5dd7192437cdc (diff)
downloadbusybox-f7e929e795c433014f76e4be808776e6dc968cbc.zip
busybox-f7e929e795c433014f76e4be808776e6dc968cbc.tar.gz
xargs: trivial code shrink
function old new delta xargs_main 807 787 -20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'findutils')
-rw-r--r--findutils/xargs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/findutils/xargs.c b/findutils/xargs.c
index 5c26685..d9f8a3b 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -222,10 +222,10 @@ static char* FAST_FUNC process_stdin(int n_max_chars, int n_max_arg, char *buf)
goto ret;
}
}
- n_max_chars -= (p - s);
- /* if (n_max_chars < 0) impossible */
store_param(s);
dbg_msg("args[]:'%s'", s);
+ n_max_chars -= (p - s);
+ /* if (n_max_chars < 0) impossible */
s = p;
n_max_arg--;
if (n_max_arg == 0 || n_max_chars == 0) {
@@ -276,10 +276,10 @@ static char* FAST_FUNC process_stdin(int n_max_chars, int n_max_arg, char *buf)
goto ret;
}
}
- n_max_chars -= (p - s);
- /* if (n_max_chars < 0) impossible */
store_param(s);
dbg_msg("args[]:'%s'", s);
+ n_max_chars -= (p - s);
+ /* if (n_max_chars < 0) impossible */
s = p;
n_max_arg--;
if (n_max_arg == 0 || n_max_chars == 0) {
@@ -317,12 +317,12 @@ static char* FAST_FUNC process0_stdin(int n_max_chars, int n_max_arg, char *buf)
*p++ = c;
if (c == '\0') { /* word's delimiter or EOF detected */
/* A full word is loaded */
- n_max_chars -= (p - s);
- /* if (n_max_chars < 0) impossible */
store_param(s);
dbg_msg("args[]:'%s'", s);
- n_max_arg--;
+ n_max_chars -= (p - s);
+ /* if (n_max_chars < 0) impossible */
s = p;
+ n_max_arg--;
if (n_max_arg == 0 || n_max_chars == 0) {
goto ret;
}